qbits.hayt
This namespace contains aliases for qbits.dsl.*, qbits.fns and qbits.utils
?
? can be used as a query value to mark a prepared statement value ex: (select :foo (where > :foo ?] [< :foo 2]))
allow-filtering
(allow-filtering value)
(allow-filtering)
Clause: sets ALLOW FILTERING on select queries, defaults to true is used without a value
alter-column
(alter-column identifier type)
Clause: takes a table identifier and a column type
alter-columnfamily
(alter-columnfamily columnfamily & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#alterTableStmt
Takes a columnfamiliy identifier and additional clause arguments:
- alter-column
- add-column
- alter-column
- rename-column
- drop-column
- with
alter-keyspace
(alter-keyspace keyspace & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#alterKeyspaceStmt
Takes a keyspace identifier and a with
clause.
alter-table
(alter-table table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#alterTableStmt
Takes a table identifier and additional clause arguments:
- alter-column
- add-column
- alter-column
- rename-column
- drop-column
- with
alter-type
(alter-type type & clauses)
alter-user
(alter-user user & clauses)
Takes clauses: * password * superuser (defaults to false)
ascii->blob
(ascii->blob x__3921__auto__)
Converts ascii to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
batch
(batch & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#batchStmt
Takes hayt queries optional clauses: * queries * using * counter * logged
bigint->blob
(bigint->blob x__3921__auto__)
Converts bigint to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->ascii
(blob->ascii x__3921__auto__)
Converts blob to ascii. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->bigint
(blob->bigint x__3921__auto__)
Converts blob to bigint. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->boolean
(blob->boolean x__3921__auto__)
Converts blob to boolean. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->counter
(blob->counter x__3921__auto__)
Converts blob to counter. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->decimal
(blob->decimal x__3921__auto__)
Converts blob to decimal. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->double
(blob->double x__3921__auto__)
Converts blob to double. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->float
(blob->float x__3921__auto__)
Converts blob to float. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->inet
(blob->inet x__3921__auto__)
Converts blob to inet. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->int
(blob->int x__3921__auto__)
Converts blob to int. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->text
(blob->text x__3921__auto__)
Converts blob to text. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->timestamp
(blob->timestamp x__3921__auto__)
Converts blob to timestamp. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->timeuuid
(blob->timeuuid x__3921__auto__)
Converts blob to timeuuid. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->uuid
(blob->uuid x__3921__auto__)
Converts blob to uuid. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->varchar
(blob->varchar x__3921__auto__)
Converts blob to varchar. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
blob->varint
(blob->varint x__3921__auto__)
Converts blob to varint. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
boolean->blob
(boolean->blob x__3921__auto__)
Converts boolean to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
column-definitions
(column-definitions column-definitions)
Clause: Takes a map of columns definitions (keys are identifiers , values, types), to be used with create-table.
columns
(columns & columns)
Clause: takes columns identifiers ex: (columns :foo “bar” :baz)
contains
contains
can be used as a query value to mark CONTAINS in where clause ex: (select :foo (where contains :foo ...]))
contains-key
contains-key
can be used as a query value to mark CONTAINS-KEY in where clause ex: (select :foo (where contains :foo ...]))
counter->blob
(counter->blob x__3921__auto__)
Converts counter to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
cql-raw
(cql-raw x)
Allows to pass raw (assumed safe) content, no escaping will be applied.
create-index
(create-index table name & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#createIndexStmt
Takes a table identifier and additional clause arguments:
- index-column
- index-name
- custom
- on (overwrites table id)
create-keyspace
(create-keyspace keyspace & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#createKeyspaceStmt
Takes a keyspace identifier and clauses: * with
create-table
(create-table table & clauses)
Takes a table identifier and additional clause arguments:
- column-definitions
- with
create-trigger
(create-trigger trigger table using)
create-type
(create-type type & clauses)
create-user
(create-user user & clauses)
Takes clauses: * password * superuser (defaults to false)
date-of
deprecated in 3.1.0
(date-of x)
DEPRECATED: USE to-date instead http://cassandra.apache.org/doc/cql3/CQL.html#usingtimeuuid
Returns a dateOf function with the supplied argument
decimal->blob
(decimal->blob x__3921__auto__)
Converts decimal to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
delete
(delete table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#deleteStmt
Takes a table identifier and additional clause arguments:
- columns (defaults to *)
- using
- where
- only-if
distinct*
(distinct* & xs)
Returns DISTINCT column id ex: (select :table (columns (distinct :foo)))
double->blob
(double->blob x__3921__auto__)
Converts double to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
drop-columnfamily
(drop-columnfamily cf & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#dropTableStmt
Takes a column family identifier and additional clauses: * if-exists
drop-index
(drop-index index & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#dropIndexStmt
Takes an index identifier and additional clauses: * if-exists
drop-keyspace
(drop-keyspace keyspace & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#dropKeyspaceStmt
Takes a keyspace identifier and additional clauses: * if-exists
drop-table
(drop-table table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#dropTableStmt
Takes a table identifier and additional clauses: * if-exists
drop-trigger
(drop-trigger trigger table)
http://cassandra.apache.org/doc/cql3/CQL.html#dropTriggerStmt
Takes a trigger identifier and a table identifier
drop-type
(drop-type type & clauses)
http://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlRefDropType.html
Takes a type identifier and additional clauses: * if-exists
float->blob
(float->blob x__3921__auto__)
Converts float to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
if-not-exists
(if-not-exists b)
(if-not-exists)
DEPRECATED use (if-exists false) Clause: Apply only if the row does not exist
in
in
can be used as a query value to mark IN in where clause ex: (select :foo (where in :foo [1 2 3]))
inet->blob
(inet->blob x__3921__auto__)
Converts inet to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
insert
(insert table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#insertStmt
Takes a table identifier and additional clause arguments: * values * using * if-exists
int->blob
(int->blob x__3921__auto__)
Converts int to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
list-perm
(list-perm & clauses)
Takes clauses: * perm (defaults to ALL if not supplied) * user * resource * recursive (defaults to true)
list-type
Generates a list type definition, takes a single argument indicating the list elements type
max-timeuuid
(max-timeuuid date)
min-timeuuid
(min-timeuuid date)
only-if
(only-if args)
Clause: takes a map or a vector of pairs (same as where
) to compose the if clause of a update/delete query
only-if'
(only-if' & args)
Clause: takes a map or a vector of pairs (same as where
) to compose the if clause of a update/delete query
order-by
(order-by & columns)
Clause: takes vectors of 2 elements, where the first is the column identifier and the second is the ordering as keyword. ex: (order-by [:asc :desc])
password
(password value)
Clause: To be used with alter-user and create-user, sets password
queries
(queries & queries)
Clause: takes hayt queries to be executed during a batch operation.
recursive
(recursive value)
(recursive)
Clause: Sets recusivity on list-perm (LIST PERMISSION) queries
resource
(resource value)
Clause: Sets resource to be modified/used with grant or list-perm
select
(select table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt
Takes a table identifier and additional clause arguments:
- columns (defaults to *)
- where
- order-by
- limit
- only-if
set-columns
(set-columns values)
(set-columns x y & more)
Clause: Takes a map of columns to be updated
set-type
Generates a set type definition, takes a single argument indicating the set elements type
superuser
(superuser value)
(superuser)
Clause: To be used with alter-user and create-user, sets superuser status
text->blob
(text->blob x__3921__auto__)
Converts text to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
timestamp->blob
(timestamp->blob x__3921__auto__)
Converts timestamp to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
timeuuid->blob
(timeuuid->blob x__3921__auto__)
Converts timeuuid to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
to-date
added in 3.1.0
(to-date x)
http://cassandra.apache.org/doc/cql3/CQL.html#timeFun
Converts the timestamp/timeuuid argument into a date type
to-timestamp
added in 3.1.0
(to-timestamp x)
http://cassandra.apache.org/doc/cql3/CQL.html#timeFun
Converts the timestamp/timeuuid argument into a timestamp type
to-unix-timestamp
added in 3.1.0
(to-unix-timestamp x)
http://cassandra.apache.org/doc/cql3/CQL.html#timeFun
Converts the timestamp/timeuuid/date argument into a bigInt raw value
token
(token & tokens)
http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt
Returns a token function with the supplied argument
truncate
(truncate table)
http://cassandra.apache.org/doc/cql3/CQL.html#truncateStmt
Takes a table identifier.
ttl
(ttl x)
http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt
Returns a TTL function with the supplied argument
unix-timestamp-of
deprecated in 3.1.0
(unix-timestamp-of x)
DEPRECATED: USE to-unix-timestamp instead http://cassandra.apache.org/doc/cql3/CQL.html#usingtimeuuid
Returns a unixTimestampOf function with the supplied argument
update
(update table & clauses)
http://cassandra.apache.org/doc/cql3/CQL.html#updateStmt
Takes a table identifier and additional clause arguments:
- using
- set-columns
- where
- only-if
- if-exists
use-keyspace
(use-keyspace keyspace)
http://cassandra.apache.org/doc/cql3/CQL.html#useStmt
Takes a keyspace identifier
using
(using opts)
(using x y & more)
Clause: Sets USING, takes keyword/value pairs for :timestamp and :ttl
uuid->blob
(uuid->blob x__3921__auto__)
Converts uuid to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
varchar->blob
(varchar->blob x__3921__auto__)
Converts varchar to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
varint->blob
(varint->blob x__3921__auto__)
Converts varint to blob. See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#functions
where
(where args)
Clause: takes a map or a vector of pairs to compose the where clause of a select/update/delete query
with
(with values)
(with x y & more)
Clause: compiles to a CQL with clause (possibly nested maps)
writetime
(writetime x)
http://cassandra.apache.org/doc/cql3/CQL.html#selectStmt
Returns a WRITETIME function with the supplied argument