src/Cassandra/KeyspaceMetadata.cs
/// <summary>
///  Returns a CQL query representing this keyspace. This method returns a single
///  'CREATE KEYSPACE' query with the options corresponding to this name
///  definition.
/// </summary>
/// <returns>the 'CREATE KEYSPACE' query corresponding to this name.
///  <see>#ExportAsString</see></returns>
Returns a CQL query representing this keyspace. This method returns a single
'CREATE KEYSPACE' query with the options corresponding to this name
definition.
Returns a CQL query representing this keyspace . This method returns a single ' CREATE KEYSPACE ' query with the options corresponding to this name definition .
public string AsCqlQuery()
        {
            var sb = new StringBuilder();
            sb.Append("CREATE KEYSPACE ").Append(CqlQueryTools.QuoteIdentifier(Name)).Append(" WITH ");
            sb.Append("REPLICATION = { 'class' : '").Append(StrategyClass).Append("'");
            foreach (var rep in Replication)
            {
                if (rep.Key == "class")
                {
                    continue;
                }
                sb.Append(", '").Append(rep.Key).Append("': '").Append(rep.Value).Append("'");
            }
            sb.Append(" } AND DURABLE_WRITES = ").Append(DurableWrites);
            sb.Append(";");
            return sb.ToString();
        }
public string AsCqlQuery ( ) { var sb = new StringBuilder ( ) ; sb . Append ( " " ) . Append ( CqlQueryTools . QuoteIdentifier ( Name ) ) . Append ( " " ) ; sb . Append ( " " ) . Append ( StrategyClass ) . Append ( " " ) ; foreach ( var rep in Replication ) { if ( rep . Key == " " ) { continue ; } sb . Append ( " " ) . Append ( rep . Key ) . Append ( " " ) . Append ( rep . Value ) . Append ( " " ) ; } sb . Append ( " " ) . Append ( DurableWrites ) ; sb . Append ( " " ) ; return sb . ToString ( ) ; }
Returns a CQL query representing this keyspace.
Returns a CQL query representing this keyspace .
the 'CREATE KEYSPACE' query corresponding to this name.
ExportAsString
the ' CREATE KEYSPACE ' query corresponding to this name . ExportAsString