counterfield = counterfield - x
instead of counterfield = x - counterfield
)alter-type
. Thanks @acron0 -> https://github.com/mpenet/hayt/pull/39upgrade to clj 1.7, removed/updated some dependencies
Performance improvements (raw speed, mem, allocations)
Remove prepared statements generation with values
qbits.hayt/->prepared since it's used by nobody now. You can still
use the ? placeholer and actually control what's happening
ex: (select :foo (where {:id ?}))
.
qbits.hayt/frozen
see testsRelease 2.0.0 (check past logs for changes)
batch
, see #30qbits.hayt/create-type
statement and qbits.hayt/user-type
type marker for UDT valuesuse clojure 1.6
where1
, using
, set-columns
, values
, with
now supports
cassaforte like signatures (unspliced map (where1 :a 1 :b 2)
or
(where1 {:a 1 :b 2})
}
new where
syntax, matches clojure style more closely (prefix
notation), it now expects a seq of seq:
(where [[= :a 1] [> :b 2]])
It can still receive a map, but it will only assume =, a vector of 2 elements will assume =.
(where {:a 1 :b 2})
where'
same as where
but allows to skip passing the wrapping vector:(where' [= :b 2] [> :c 3])
where1
is the equivalent of the previous where
syntax from v1
and early v2 betas. ex: (where1 {:a [> 2]}}
Add support for paging on composite in where
(where [[= :a 1]
[>= [:b :c :d] [1 2 3]]])
(select :foo (columns (distinct* :foo :bar :baz)))
where
CASSANDRA-4511(where [contains :l 1]}
(where [contains-key :m 2]}
Add support for static columns in schemas
Add sugar for operations on collections and counters
(update :foo
(set-columns {:bar 1
:baz (inc-by 2)}))
(update :foo
(set-columns {:bar 1
:baz (dec-by 2)}))
(update :foo
(set-columns {:baz (prepend ["asdf"])})
(where [[:foo "bar"]]))
(update :foo
(set-columns {:baz (append ["asdf"])})
(where [[:foo "bar"]]))
Add support for vectors in set-columns and values. Ex: (insert :foo (values [[:a 1] [:b 2]]))
See Issue #19 for details.
Some changes require you to run against Cassandra 2.0+ !!
Keywords as values are no longer encoded as strings and return a placeholder for a named prepared statement value. See #18
The following
(->raw (select :foo (where {:bar :baz})))
used to generate this:
"SELECT FROM foo WHERE bar = 'baz';"
and now this:
"SELECT FROM foo WHERE bar = :baz;"
When using ->prepared
the values for using
and limit
are now
parameterized.
The IN
operator in where clauses when using ->prepared
is now
variadic (it returns the values as an array in the parameter list
and uses a single ? placeholder). This is not backward compatible with C* 2.0-
(where {:foo [:in [1 2 3]]}) -> ["...WHERE foo IN ?;" [[1 2 3]]]
apply-map
has been removed from qbits.hayt.utils
(it didn't make
sense since we now have proper named prepared statement
placeholders).IF NOT EXISTS
clauses in create/drop statements?
into utils.cljqbits.hayt.fns/?
to be used as prepared statement value
placeholder when using ->raw to generate prepared statements.create-trigger
, drop-trigger
qbits.hayt.clause/if-exists
** Added qbits.hayt.fns/distinct*
** qbits.hayt.clause/if-not-exists
is deprecated, use
(qbits.hayt.clause/if-exists false)
** minor code cleanups in qbits.hayt.cql
qbits.hayt.fns/token
is now variadic, allowing composite token valuesqbits.hayt.dsl.verb
becomes qbits.hayt.dsl.statement
.
This should be backward compatible as long as you don't use them
directly, the aliases have been updated.Fix Collection types definitions (they were quoted)
Fix DELETE * statement :emit (no * on delete, it now accepts nil column or :*)
Exposed cql-raw
and cql-fn
, the former allows to pass arbitrary raw
content as value, and the later allows to create function wrappers.
These two could be usefull when/if we don't support a feature and/or
you need lower level access to value/fn encoding.
Added alias support
Added ALTER DROP clause support
tests, docstrings improvements
Joda time support
Moved cassandra-all in dev/test profiles
CQL 3.0.3 support (create secondary index aka "CREATE CUSTOM INDEX")
Added CAS support: if-not-exists
only-if
clauses
https://issues.apache.org/jira/browse/CASSANDRA-5443
Performance/ressource use improvements
Added support for null values
Added support for Date, blob (ByteBuffer instances), InetAddress literals
Added noarg versions of bool clauses
Completed/fixed coverage of blobAsX and XAsBlob functions
Deprecate q->
, since clauses/queries are just maps, use the usual
merge
/assoc
/into
. It will be removed in a future version likely 1.0.0
Allow to use lowercased/dashed kw for permission, ex: :full-access
or :FULL_ACCESS
Fix :primary-key
to allow composites
Fix all permission queries, grant, revoke, list-permission (missing PERMISSION or PERMISSIONS)
Renamed list-permission to list-perm
Renamed add
clause to add-column
(breaking change)
Fixed bug in batch clause (begin missing), and add missing arguments (UNLOGGED, COUNTER)
Added rename-column
grant-user
, revoke-user
, alter-user
, create-user
,
drop-user
, list-users
, list-permissions
Added the following clauses table
, keyspace
, column-family
,
logged
, counter
, resource
, user
, superuser
, password
,
permission
, recursive
.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close