- allow unknown cluster map options (it used to throw)
- bump clojure to 1.10.0-beta4
- bump java-driver to 3.6
- bump core.async to 0.4.474
- bump manifold to 0.1.8
- bump test-check to 0.10.0-alpha3
- bump qbits.commons to 0.5.1
- Changed dec-by to use remove-tail (
counterfield = counterfield - x
instead ofcounterfield = x - counterfield
)
- Internals changes that should make query generation 2x 3x faster and more alloc friendly depending on the query
- Added DROP TYPE
- Add new cql functions
- add missing entry point for
alter-type
. Thanks @acron0 -> #39
- auto-extend alia protocols if alia is detected
- allow any sequential in counter/collection ops
-
upgrade 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 ?}))
.
- Add 2.1+ udt support,
qbits.hayt/frozen
see tests
Release 2.0.0 (check past logs for changes)
- nil queries are ignored in
batch
, see #30
- no longer depend on flatland/useful
- Add
qbits.hayt/create-type
statement andqbits.hayt/user-type
type marker for UDT values - Slightly improved perf/ressource use
- Add tests for UDT litterals
-
use 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 aswhere
but allows to skip passing the wrapping vector:
(where' [= :b 2] [> :c 3])
-
where1
is the equivalent of the previouswhere
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]]])
- qbits.hayt/distinct* is now variadic, thanks @pyr
(select :foo (columns (distinct* :foo :bar :baz)))
- Add support for secondary index on collections in
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 forusing
andlimit
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 fromqbits.hayt.utils
(it didn't make sense since we now have proper named prepared statement placeholders).
- fix
IF NOT EXISTS
clauses in create/drop statements - add drop-columnfamily, alter-columnfamily
- Moved
?
into utils.clj
- Added
qbits.hayt.fns/?
to be used as prepared statement value placeholder when using ->raw to generate prepared statements.
- Added
create-trigger
,drop-trigger
- Added keyspace qualified identifiers (ex: "select * from mykeyspace.mytable;")
- fix blob->X functions, they now accept bytebuffers and byte array as input and properly encode them
- Support up to cql 3.1.1 http://cassandra.apache.org/doc/old/CQL-3.0.html#a3.1.1
** Added
qbits.hayt.clause/if-exists
** Addedqbits.hayt.fns/distinct*
**qbits.hayt.clause/if-not-exists
is deprecated, use(qbits.hayt.clause/if-exists false)
** minor code cleanups inqbits.hayt.cql
- Preserve ns in when using namespaced keywords as values
qbits.hayt.fns/token
is now variadic, allowing composite token values
- Dropped dependency on clj 1.5
- Dropped dependency on cassandra-all, no api changes
- Add encoding support for byte array values
- Allow :primary-key :abc (value not wrapped in a vector)
- Minor perf. improvements
- ns change:
qbits.hayt.dsl.verb
becomesqbits.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 :*)
- Internals change to accomodate cassaforte
-
Exposed
cql-raw
andcql-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
- Lift restriction on nil values (supported in C* 1.2.4+)
-
Deprecate
q->
, since clauses/queries are just maps, use the usualmerge
/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
- cleaner AST and document (briefly) it's use in the readme
- renamed/updated the auth functions/clauses to match their cql counterpart more closely.
-
Renamed
add
clause toadd-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
.