public void Create() { List <string> cqls = CqlQueryTools.GetCreateCQL(this, false); foreach (string cql in cqls) { _session.WaitForSchemaAgreement(_session.Execute(cql)); } }
public void Create() { var cqls = CqlQueryTools.GetCreateCQL(this); foreach (var cql in cqls) { _session.WaitForSchemaAgreement(_session.Execute(cql)); } }
public void Create(ConsistencyLevel consictencyLevel = ConsistencyLevel.Default) { var cqls = CqlQueryTools.GetCreateCQL(this); foreach (var cql in cqls) { _session.Cluster.WaitForSchemaAgreement(_session.Execute(cql, consictencyLevel).QueriedHost); } }
public void CreateIfNotExists() { if (_session.BinaryProtocolVersion > 1) { List <string> cqls = CqlQueryTools.GetCreateCQL(this, true); foreach (string cql in cqls) { _session.WaitForSchemaAgreement(_session.Execute(cql)); } } else { try { Create(); } catch (AlreadyExistsException) { //do nothing } } }