Commit graph

33 commits

Author SHA1 Message Date
Sean Corfield
9a76e4c25a Add as-arrays-adapter 2019-08-21 14:47:55 -07:00
Sean Corfield
e0b0c214fd Improve printability as part of #51
Since `str` may be able to realize a row and render it as a string, attempts to print a row use this route to circumvent `print-sequential` failing due to lazy evaluation.
2019-08-02 12:42:00 -07:00
Sean Corfield
9372ce11cd Fix #50 by testing against (embedded) PostgreSQL
This is the first database that returns lowercase columns in results so 
there are a lot of conditionals in the tests now. It also returns entire 
rows on inserts instead of just the generated key.
2019-07-24 17:32:58 -07:00
Sean Corfield
7184ef996c Fixes #41; Addresses #40; Expand prepared statement documentation
* Combine adjacent `with-open` calls.
* Show how `set-parameters` is used.
* Add a section on batched parameters, with their caveats, and how to 
use them.
2019-07-08 20:48:56 -07:00
Sean Corfield
1fe7e92df2 Fixes #34 by adding save point tests
And updating the Transactions documentation to show save point examples.
2019-07-02 18:36:00 -07:00
Sean Corfield
1cec0a2643 Fixes #37; Fixes #36
* Fix `with-transaction` spec and how it invokes `transact` when no 
options map is provided.
* Adds type hint to `with-transaction`.
* Document manual rollback of transactions.
2019-07-02 16:45:48 -07:00
Sean Corfield
e1b42b1804 Address #31 by improving string representation of reified objects
At least this should give a hint as to what you did wrong...
2019-06-11 16:47:58 -07:00
Sean Corfield
fdfb0697ec Address #24 by setting warn on reflection in tests
This highlights the reflection on `.close` (in the connection tests).
2019-05-29 09:04:21 -07:00
Sean Corfield
a32c5b9e66 Address #16 by renaming reducible! to plan for Beta 1 2019-05-22 16:22:14 -07:00
Sean Corfield
adf5a03e05 Address #21 by adding next.jdbc.specs
Docs still need to be updated for this!
2019-05-21 21:45:05 -07:00
Sean Corfield
8d7f1b54da Ensure jdbc-test can be run standalone 2019-05-01 16:21:23 -07:00
Sean Corfield
cf75268087 Rename :gen-fn to :builder-fn 2019-04-24 14:22:35 -07:00
Sean Corfield
2702a01773 Multi-DB testing
Instead of just testing against H2 in-memory, we now test against Derby, 
H2 in-memory, H2 on-disk, hsqldb, and SQLite
2019-04-21 17:10:29 -07:00
Sean Corfield
228335d2f3 Turn all the examples into tests 2019-04-19 22:51:48 -07:00
Sean Corfield
12e396683c Add tests for map-like reducible! result set
Ensures basic associative/lookup access do not cause row building; 
ensures assoc/seq produce real maps; ensure datafiable-row produces a 
real map with metadata.
2019-04-19 21:53:55 -07:00
Sean Corfield
d5ee7defd9 Test cleanup 2019-04-18 22:43:27 -07:00
Sean Corfield
f7c753d696 Update tests and timings 2019-04-18 08:13:16 -07:00
Sean Corfield
7b98b7337c One more example 2019-04-18 00:43:10 -07:00
Sean Corfield
86db20b94b Improve default behavior of reducible! when forced to create a row
Defaults to `map-row-builder`; add examples of `assoc`, 
`datafiable-row`.
2019-04-18 00:36:22 -07:00
Sean Corfield
b82f349717 Add example row builder for record
Note: this makes a lot of assumptions about the shape of the result 
set's rows!
2019-04-18 00:28:55 -07:00
Sean Corfield
5019995feb Move SQL sugar functions to next.jdbc.sql
Make SQL string builder functions private.
2019-04-17 23:56:44 -07:00
Sean Corfield
b5eb5b880e Consolidate the three use cases
* Remove `execute!` and `execute-one!` from `result-set`.
* Add `-execute-all` and `-execute-one` to the `Executable` protocol 
instead.
* Remove `:row-fn` support.
* Allow a `PreparedStatement` to be `Connectable` so it can be used with 
`datafy`/`nav`.
* Rewrite `RowBuilder` protocol and add `ResultSetBuilder` protocol; add 
`as-arrays` as a builder.
2019-04-17 23:34:31 -07:00
Sean Corfield
788015909f First cut at RowBuilder
Temporarily disables as-arrays
2019-04-10 23:59:19 -07:00
Sean Corfield
d2f0afa973 Fix #9 by combining ->factory and create again 2019-04-10 21:46:38 -07:00
Sean Corfield
e85f627a00 Address #2 by solidifying row function API
Low-level `execute!` requires row function to be passed. High-level API 
allows row function, else `datafiable-row`. Syntactic sugar still uses 
`:row-fn`.
2019-04-02 00:41:39 -07:00
Sean Corfield
c2c9bcbba4 Address #1 by solidifying syntactic sugar functions
Cleans up how options are handled. Adds `query` alias for `execute!`, 
clarifiies the syntactic sugar nature of the additional functions.
2019-04-01 23:57:12 -07:00
Sean Corfield
f217e86038 Address #2 by adding rs/as-arrays 2019-04-01 22:19:02 -07:00
Sean Corfield
28f735bafd Add benchmarks against clojure.java.jdbc 2019-04-01 20:37:14 -07:00
Sean Corfield
6e08557d92 Add docstrings to everything 2019-03-31 23:17:12 -07:00
Sean Corfield
8646472e79 Flesh out more SQL generators
Add high-level insert!, insert-multi!, update!, delete!

Add more examples to tests.
2019-03-31 19:30:01 -07:00
Sean Corfield
38017d720d Move examples to tests for now 2019-03-31 17:29:40 -07:00
Sean Corfield
954a1ed306 First functioning version of execute! 2019-01-07 23:03:20 -08:00
Sean Corfield
a8c1c37cfd Baseline project setup 2019-01-07 20:38:58 -08:00