CQL statement not working

Showing 1-5 of 5 messages
CQL statement not working Ian Campbell 9/26/12 1:48 AM
The following statements throw a syntax error, but are correct CQL per the official 1.2 documentation:

db.ExecuteNonQuery(@"CREATE TABLE Test (KEY text, attrname text, attrvalue text, PRIMARY KEY (KEY, attrname, attrvalue)) WITH COMPACT STORAGE;");
db.ExecuteNonQuery(@"CREATE TABLE Test (KEY text, attrname text, attrvalue text, PRIMARY KEY (KEY, attrname, attrvalue));");

The following works:

db.ExecuteNonQuery(@"CREATE TABLE Test (KEY text PRIMARY KEY, attrname text, attrvalue text);");

It seems that both the composite PK and compact storage statements create a syntax error.
Re: [FluentCassandra:127] CQL statement not working Nick Berardi 9/26/12 4:07 AM
You need to set CQL3 in the connection. You can do this by creating a ConnectionBuilder object and passing it in. 

The one that works is the old CQL version which is enabled by default on a connection. 

--
Nick Berardi
(484) 302-0125
Sent from my tablet. 
--
You received this message because you are subscribed to the Google Groups "FluentCassandra" group.
To post to this group, send email to fluentc...@googlegroups.com.
To unsubscribe from this group, send email to fluentcassand...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/fluentcassandra/-/6VZRI3KlRUsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Re: [FluentCassandra:127] CQL statement not working Ian Campbell 9/26/12 6:39 AM
Great, got that working thanks.

Now the following line throws "{"No connection could be made because all servers have failed."}"

dbc.ExecuteNonQuery(@"TRUNCATE Test;");

I can't find any native calls to this method.
Re: [FluentCassandra:130] CQL statement not working Nick Berardi 9/26/12 6:46 AM
Sounds like your server isn't running for no connections.  Check your host and port.
 
To truncate do the following:
 
var family = dbc.GetColumnFamily("Test");
family.RemoveAllRows();
 
Hope this helps.

To view this discussion on the web visit https://groups.google.com/d/msg/fluentcassandra/-/pSFXuwXpKBkJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: [FluentCassandra:130] CQL statement not working Ian Campbell 9/26/12 7:18 AM
You are right. For some reason the server is doing some sort of soft shutdown during the bulk insert test. If it makes it through the test, I can run either truncate method.

I have no idea why it's aborting, and get no error.