Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Commit

Permalink
add fixes for tests, add timestamp type
Browse files Browse the repository at this point in the history
  • Loading branch information
devdazed committed Oct 8, 2013
1 parent 93fc7fd commit 254ef01
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: node_js
node_js:
#- "0.6"
#- "0.8"
- "0.6"
- "0.8"
- "0.10"

env:
#- CASSANDRA_VERSION=1.0.12
#- CASSANDRA_VERSION=1.1.12
#- CASSANDRA_VERSION=1.2.10
- CASSANDRA_VERSION=1.0.12
- CASSANDRA_VERSION=1.1.12
- CASSANDRA_VERSION=1.2.10
- CASSANDRA_VERSION=2.0.1

before_install:
Expand Down
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,8 @@
* Fix for CQL3 UUID escaping [ @industral #98 ]
* Deserialize the key [ @wwwy3y3 #111 ]
* Support latest Node [ @JohnMcLear #116 ]
* Add callback to close method and emit connect [ @devdazed #114 ]
* remove requirement to set CQL version explicitly [ @tristanls #109 ]
* Fix for UUID Serializers [ @beatlevic #97 ]
* Add support for TimestampType to marshall [ @devdazed ]
* Fixed Travis tests [ @devdazed ]
3 changes: 2 additions & 1 deletion lib/marshal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ var TYPES = {
'ReversedType': { ser:IDENTITY, de:IDENTITY },
'MapType': { ser:Serializers.encodeBinary, de:Deserializers.decodeCollection },
'SetType': { ser:Serializers.encodeBinary, de:Deserializers.decodeCollection },
'ListType': { ser:Serializers.encodeBinary, de:Deserializers.decodeCollection }
'ListType': { ser:Serializers.encodeBinary, de:Deserializers.decodeCollection },
'TimestampType': { ser:Serializers.encodeDate, de:Deserializers.decodeDate }
};

/**
Expand Down
8 changes: 4 additions & 4 deletions test/helpers/cql3.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"static_create_cnt_cf#cql" : "CREATE TABLE cql_cnt_test (key varchar PRIMARY KEY, cnt counter)",
"static_drop_cf#cql" : "DROP COLUMNFAMILY cql_test",
"static_update#cql" : "UPDATE cql_test SET foo='bar' WHERE id='foobar'",
"static_update_cnt#cql" : "UPDATE cql_cnt_test SET cnt=cnt+10 WHERE key=1",
"static_update_cnt#cql" : "UPDATE cql_cnt_test SET cnt=cnt+10 WHERE key='1'",
"static_select#cql" : "SELECT foo FROM cql_test WHERE id='foobar'",
"static_select*#cql" : "SELECT * FROM cql_test WHERE id='foobar'",
"static_select_cnt#cql" : "SELECT cnt FROM cql_cnt_test WHERE key=1",
"static_select_cnt#cql" : "SELECT cnt FROM cql_cnt_test WHERE key='1'",
"static_count#cql" : "SELECT COUNT(1) FROM cql_test WHERE id='foobar'",
"static_countstar#cql" : "SELECT COUNT(*) FROM cql_test WHERE id='foobar'",
"static_delete#cql" : "DELETE FROM cql_test WHERE id='foobar'",
Expand All @@ -23,15 +23,15 @@
"dynamic_update#vals1" : ["2012-03-01+0000", 10, "www.example.com"],
"dynamic_update#vals2" : ["2012-03-01+0000", 10, "www.foo.com"],
"dynamic_update#vals3" : ["2012-03-02+0000", 10, "www.foo.com"],
"dynamic_select1#cql" : "SELECT ts FROM clicks WHERE userid = '10'",
"dynamic_select1#cql" : "SELECT ts FROM clicks WHERE userid = 10",
"dynamic_select2#cql" : "SELECT userid, url, ts FROM clicks WHERE userid = 10 AND url = 'www.foo.com'",

"dense_create_cf#cql" : "CREATE TABLE connections (userid int, ip text, port int, ts timestamp, PRIMARY KEY (userid, ip, port)) WITH COMPACT STORAGE",
"dense_update#cql" : "UPDATE connections SET ts = '?' WHERE userid = ? AND ip = '?' AND port = ?",
"dense_update#vals1" : ["2012-03-01+0000", 10, "192.168.1.1", 8080],
"dense_update#vals2" : ["2012-03-01+0000", 10, "192.168.1.1", 1337],
"dense_update#vals3" : ["2012-03-02+0000", 10, "192.168.1.1", 1337],
"dense_select1#cql" : "SELECT ts, port FROM connections WHERE userid = '10'",
"dense_select1#cql" : "SELECT ts, port FROM connections WHERE userid = 10",
"dense_select2#cql" : "SELECT userid, ip, port, ts FROM connections WHERE userid = 10 AND ip = '192.168.1.1' AND port = 1337",

"sparse_create_cf#cql" : "CREATE TABLE timeline (userid int, posted_at timestamp, body text, posted_by text, PRIMARY KEY (userid, posted_at))",
Expand Down

0 comments on commit 254ef01

Please sign in to comment.