Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set column timestamps to microseconds

  • Loading branch information...
commit 69556f8695a91ff1282ed82d0fe4e8a231036ac9 1 parent 493805d
@devdazed devdazed authored
Showing with 10 additions and 5 deletions.
  1. +5 −0 History.md
  2. +4 −4 lib/column.js
  3. +1 −1  package.json
View
5 History.md
@@ -128,3 +128,8 @@
* Stop Cassandra after tests in Travis-CI [ @ctavan #41 ]
* Add support for ColumnFamily.truncate [ @devdazed #28 ]
* Add better CQL escaping and parameterization [ @devdazed #36, #39 ]
+
+0.5.1 / 2012-05-02
+==================
+
+ * Set column timestamps in microseconds
View
8 lib/column.js
@@ -14,18 +14,18 @@ var Column = function(name, value, timestamp, ttl){
* The name of the column, can be any type, for composites use Array
*/
this.name = name;
-
+
/**
* The value of the column
*/
this.value = value;
-
+
/**
* The timestamp of the value
* @default {Date} new Date();
*/
this.timestamp = timestamp || new Date();
-
+
/**
* The ttl for the column
*/
@@ -42,7 +42,7 @@ Column.prototype.toThrift = function(nameMarshaller, valueMarshaller){
return new ttypes.Column({
name: nameMarshaller.serialize(this.name),
value: valueMarshaller.serialize(this.value),
- timestamp: this.timestamp.getTime(),
+ timestamp: this.timestamp.getTime() * 1000,
ttl:this.ttl
});
};
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "helenus"
- , "version": "0.5.0"
+ , "version": "0.5.1"
, "description": "NodeJS Bindings for Cassandra"
, "keywords": ["cassandra"]
, "author": "Russell Bradberry <rbradberry@gmail.com>"
Please sign in to comment.
Something went wrong with that request. Please try again.