cassanknex
Advanced tools
Comparing version 1.5.1 to 1.5.2
{ | ||
"name": "cassanknex", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "An Apache Cassandra CQL query builder with support for the DataStax NodeJS driver, written in the spirit of Knex.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,3 +46,3 @@ | ||
var cassanKnex = require("cassanknex")(); | ||
var qb = cassanKnex.QUERY_COMMAND() | ||
var qb = cassanKnex(KEYSPACE).QUERY_COMMAND() | ||
.QUERY_MODIFIER_1() | ||
@@ -56,3 +56,4 @@ . | ||
Where `QUERY_COMMAND` and `QUERY_MODIFIER` are among the list of available [Query Commands](#QueryCommands) and [Query Modifiers](#QueryModifiers). | ||
Where `KEYSPACE` is the name of the relevant keyspace and | ||
`QUERY_COMMAND` and `QUERY_MODIFIER` are among the list of available [Query Commands](#QueryCommands) and [Query Modifiers](#QueryModifiers). | ||
@@ -78,3 +79,3 @@ ### <a name="ExecutingQueries"></a>As a query executor | ||
var qb = cassanKnex.QUERY_COMMAND() | ||
var qb = cassanKnex(KEYSPACE).QUERY_COMMAND() | ||
.QUERY_MODIFIER_1() | ||
@@ -154,3 +155,3 @@ . | ||
var qb.select("id", "foo", "bar", "baz") | ||
var qb("keyspace").select("id", "foo", "bar", "baz") | ||
.where("id", "=", "1") | ||
@@ -165,3 +166,3 @@ .orWhere("id", "in", ["2", "3"]) | ||
// executes query : | ||
// "SELECT id,foo,bar,baz FROM cassanKnexy.table | ||
// "SELECT id,foo,bar,baz FROM keyspace.table | ||
// WHERE id = ? OR id in (?, ?) | ||
@@ -312,3 +313,3 @@ // OR baz = ? AND foo IN (?, ?) | ||
##### <a name="QueryCommands-Rows"></a>*For standard (row) queries*: | ||
- insert - *compile an **insert** query string* | ||
- insert - *compile an __insert__ query string* | ||
@@ -332,3 +333,3 @@ ```js | ||
``` | ||
- select - *compile a **select OR select as** query string* | ||
- select - *compile a __select OR select as__ query string* | ||
- select all columns for a given query: | ||
@@ -362,3 +363,3 @@ | ||
``` | ||
- update - *compile an **update** query string* | ||
- update - *compile an __update__ query string* | ||
- simple set column values: | ||
@@ -396,3 +397,3 @@ | ||
``` | ||
- delete - *compile a **delete** query string* | ||
- delete - *compile a __delete__ query string* | ||
- delete all columns for a given row: | ||
@@ -494,3 +495,3 @@ | ||
- 1.5.1 | ||
- 1.5.1, 1.5.2 | ||
- OMG DOCS! | ||
@@ -497,0 +498,0 @@ - 1.5.0 |
84744
511