Commit graph

79 commits

Author SHA1 Message Date
Sean Corfield
3b0b059f62 Add connection tests
Improve handling of relative files with H2 database connections.
2019-04-18 21:35:38 -07:00
Sean Corfield
d59b1ec2fb Basic SQL tests and bug fix!
Multi-row insert did not apply `:column-fn` correctly.
2019-04-18 18:31:15 -07:00
Sean Corfield
67a2d3918c Basic quoted tests 2019-04-18 18:30:38 -07:00
Sean Corfield
e1fa7055b4 Stub test namespaces
Yes, real tests are coming soon...
2019-04-18 14:15:15 -07:00
Sean Corfield
2cd9e9372d Fix docstring typos 2019-04-18 14:09:07 -07:00
Sean Corfield
e85cbf7c95 Make datafy/nav implementation more robust
Also some documentation cleanup
2019-04-18 14:06:14 -07:00
Sean Corfield
8c508b8416 Documentation cleanup 2019-04-18 13:19:59 -07:00
Sean Corfield
688e94d9d8 Link to Contrib discussion issue 2019-04-18 08:29:46 -07:00
Sean Corfield
3b2d2a194c Update to latest API
Declares API to have reached stability and updates usage and examples to 
latest API.
2019-04-18 08:15:02 -07:00
Sean Corfield
f7c753d696 Update tests and timings 2019-04-18 08:13:16 -07:00
Sean Corfield
7f2d3479e9 Split :entities into two options
`:table-fn` and `:column-fn`
2019-04-18 08:12:56 -07:00
Sean Corfield
e5ea6af959 Rewrite builders as records
This seems to be very slightly faster than using `reify`. Also rename 
the map builder to `as-maps` and add unqualified variants of builders.
2019-04-18 08:12:12 -07:00
Sean Corfield
90a4b7d727 Update README for syntactic sugar functions 2019-04-18 01:03:39 -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
50fbc5f8f1 Respect :gen-fn in execute-one 2019-04-18 00:28:23 -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
a17054b61a Improve protocol documentation 2019-04-17 23:43:32 -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
eefea54358 Merge branch 'master' of github.com:seancorfield/next-jdbc 2019-04-10 21:46:46 -07:00
Sean Corfield
d2f0afa973 Fix #9 by combining ->factory and create again 2019-04-10 21:46:38 -07:00
Sean Corfield
8eeee78ed9
Update CONTRIBUTING.md 2019-04-06 13:08:50 -07:00
Sean Corfield
e5e580846f Document usage, intended use cases, and differences
Expand the README to provide more guidance and motivation.
2019-04-04 20:26:18 -07:00
Sean Corfield
9abf9f6380 Fix update count key to :next.jdbc/update-count 2019-04-04 20:25:20 -07:00
Sean Corfield
10929796ff Merge branch 'master' of github.com:seancorfield/next-jdbc 2019-04-04 19:31:28 -07:00
Sean Corfield
571ad64a3f Explain motivations in README 2019-04-04 18:52:38 -07:00
Sean Corfield
1fb1c44bcb
Merge pull request #8 from ikitommi/NoDestructure
Manually destructure options
2019-04-03 16:19:43 -07:00
Tommi Reiman
c7ebec1fa2 Manually destructure options 2019-04-02 22:37:53 +03: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
a76189d9c8 Fix #4 by adding transact
`with-transaction` now delegates to `transact` which in turn delegates 
to `p/-transact`.
2019-04-01 23:43:10 -07:00
Sean Corfield
be9e4a6a55 Rename protocols
For internal consistency and also to avoid confusion with 
`clojure.java.jdbc` protocols.
2019-04-01 23:32:24 -07:00
Sean Corfield
6d1a42a0a0 Fix #6 by adding IReadColumn and ISQLParameter protocols
The latter can be extended via metadata but the former cannot (since 
only the latter is coming from Clojure).
2019-04-01 23:25:10 -07:00
Sean Corfield
4b81a42b4d Allow Sourceable to be overridden via metadata 2019-04-01 23:22:59 -07:00
Sean Corfield
f217e86038 Address #2 by adding rs/as-arrays 2019-04-01 22:19:02 -07:00
Sean Corfield
81be787316 Improve docstrings throughout 2019-04-01 21:31:38 -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
561ccfc621 Add simple SQL generators 2019-03-31 18:22:04 -07:00
Sean Corfield
31cbecf411 Improve function naming in prepare ns 2019-03-31 17:30:10 -07:00
Sean Corfield
38017d720d Move examples to tests for now 2019-03-31 17:29:40 -07:00
Sean Corfield
376856600e Add quoted entity functions 2019-03-31 17:29:21 -07:00
Sean Corfield
ac95379bce Reorganize into multiple namespaces 2019-03-31 16:54:34 -07:00
Sean Corfield
4d41faa8cd Restore :identifiers functionality 2019-03-30 23:31:35 -07:00
Sean Corfield
2cb3c20122 Renaming/cleanup 2019-03-30 23:13:01 -07:00
Sean Corfield
451a5fbd3b Handle generated keys 2019-03-30 23:12:37 -07:00
Sean Corfield
4741db1453 Fix column name when table name not known 2019-03-30 23:12:04 -07:00