Brian J. Cardiff
1e882e35d2
Docs: minor edit
2017-09-08 10:08:24 -03:00
Brian J. Cardiff
f4c1c3626b
Merge pull request #65 from crisward/patch-1
...
Release connection when query cannot be built
2017-09-08 10:03:51 -03:00
Brian J. Cardiff
966b5ac42b
Avoid tracking the connection if the statement failed to be built
2017-09-07 19:29:32 -03:00
Brian J. Cardiff
9b03aa6535
Release connection when unprepared statements can't be built
...
Add specs
Fix typo in docs
2017-09-07 19:21:36 -03:00
Cris Ward
4fe3884898
Release connection when query cannot be built
...
This was leaking connection when a query could not be build - ie if an invalid column name was used.
More info here - https://github.com/crystal-lang/crystal-mysql/issues/40
2017-07-27 15:08:05 +01:00
Brian J. Cardiff
28c6f3b715
bump version 0.4.2. Release notes.
2017-04-21 17:24:28 -03:00
Nick Franken
5d5b901da1
Update to crystal 0.22.0 ( #50 )
...
* `WeakRef#target` was renamed to `WeakRef#value`
2017-04-21 11:14:42 -03:00
Brian J. Cardiff
912113d7fb
bump version 0.4.1. Release notes.
2017-04-10 13:45:24 -03:00
Brian J. Cardiff
39e17f82ca
Add #query_each . Fixes #18
2017-04-10 12:48:48 -03:00
Brian J. Cardiff
5697bd5c58
Fix docs
2017-04-10 12:47:38 -03:00
Brian J. Cardiff
c096294496
Merge pull request #48 from crystal-lang/shared-specs
...
Shared specs
2017-04-10 12:13:19 -03:00
Brian J. Cardiff
6c7aea0528
docs & formatting
2017-04-10 10:28:17 -03:00
Brian J. Cardiff
456ff5aa36
Add specs to use ResultSet as DB::ResultSet
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
074368a47e
Add drop table syntax
...
* Allows to run all test in same database by deleting tables if exists
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
07b4e9f4a8
Minor fixes. Use some type for .scalar("select ?", nil)
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
dba3c03da8
Include sql_type for sql_scalar when available.
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
168aac142c
switch for prepared/unprepared specs. pass ColumnDefs instead of names
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
f80e689c87
common specs extracted from crystal-mysql
2017-04-06 15:57:27 -03:00
Brian J. Cardiff
bb3203301b
Deal with unexpected ResultSet#read types during runtime.
2017-04-06 15:55:13 -03:00
Brian J. Cardiff
545d758ae0
Update DB::VERSION
2017-03-21 15:28:27 -03:00
Brian J. Cardiff
348a3536c4
Release notes for v0.4.0
2017-03-20 15:33:26 -03:00
Brian J. Cardiff
385cf70a8a
Introduce DB::ConnectionContext ( #44 )
...
* make Database a ConnectionContext.
* introduce SingleConnectionContext for independant connections.
* add `DB#connect` to create non pooled connections.
2017-03-20 15:08:30 -03:00
Brian J. Cardiff
c63ea48748
Close result_set with using Mapping.from_rs
2017-03-20 13:54:39 -03:00
Brian J. Cardiff
96663d8d21
Merged branch bugfix/mapping-nil into master ( #40 )
2017-03-06 12:19:04 -03:00
Brian J. Cardiff
2886c207e0
Add support for nillables with T | Nil
syntax.
2017-03-06 12:18:04 -03:00
RX14
0797ce72a3
Allow nilable types in DB.mapping
...
Previously, using a Nilable type in DB.mapping instead of nilable: true would
fail with a nil assertion error.
2017-02-15 16:09:01 +00:00
Brian J. Cardiff
3fa1eac6c5
Add Database#checkout, Connection#release for non block connection use ( #38 )
2017-02-12 16:30:32 -03:00
Brian J. Cardiff
09b8997636
Add before_checkout/after_release callbacks for resources in pool ( #36 )
...
add auto_release to DB::Connection (default true on each pool checkout).
fixes #35 .
2017-01-16 16:47:58 -03:00
Brian J. Cardiff
e3762eec46
update .gitignore
2016-12-26 11:09:19 -03:00
Brian J. Cardiff
c2c1f31a90
bump version 0.3.3
2016-12-24 20:43:32 -03:00
Brian J. Cardiff
eb82b96c0d
update to crystal 0.20.3
...
* add missing forall annotations
2016-12-24 20:39:40 -03:00
Brian J. Cardiff
3acb5b8f39
Add documentation links in README.md
2016-12-21 18:17:45 -03:00
Paul Smith
8e3bb19b6d
Add note about using $1, $2, etc. for pg driver ( #31 )
2016-12-16 15:31:24 -03:00
Brian J. Cardiff
7d30e9f50e
bump version 0.3.2
2016-12-16 11:57:44 -03:00
Brian J. Cardiff
039035a397
fix #scalar queries where not handled with retry connection pool logic
2016-12-16 11:56:27 -03:00
Brian J. Cardiff
8e8d8024f9
bump version 0.3.1
2016-12-15 14:47:10 -03:00
Brian J. Cardiff
2ca60ba43f
Add ConnectionRefused exception
...
* required to fix retry+connection initialization corner case.
2016-12-15 14:40:56 -03:00
Brian J. Cardiff
4c74e6c9da
bump version 0.3.0
2016-12-14 15:22:23 -03:00
Brian J. Cardiff
683e020b85
update readme and changelog
2016-12-14 15:21:33 -03:00
Brian J. Cardiff
4e238f655f
add Bool and Time to DB::Any fixes #4 closes #24
2016-12-14 15:17:40 -03:00
Brian J. Cardiff
ddd04da915
update readme/changelog
2016-12-14 12:25:32 -03:00
Brian J. Cardiff
8a1824ac23
Merge pull request #27 from crystal-lang/feature/nested-transactions
...
Feature/nested transactions
2016-12-14 12:15:30 -03:00
Brian J. Cardiff
d7ccecae9b
minimal docs for transactions
2016-12-14 12:13:46 -03:00
Brian J. Cardiff
ed3ed71501
allow raise after explicit rollback within #transaction(&block)
2016-12-14 11:37:49 -03:00
Brian J. Cardiff
dc26498948
unwrap args
2016-12-14 11:32:53 -03:00
Brian J. Cardiff
c6b6517145
add connection.object_id to savepoint names.
...
s/crystal/cr/ to shorten a bit the name.
2016-12-14 11:07:17 -03:00
Brian J. Cardiff
882253bf4a
specs to ensure connection is not returned to pool in nested transaction
2016-12-14 10:57:12 -03:00
Brian J. Cardiff
c491bd8962
add nested transaction with savepoints
2016-12-13 16:47:23 -03:00
Brian J. Cardiff
9bde76865e
add todo for corner case of transaction(&block)
2016-12-13 16:47:23 -03:00
Brian J. Cardiff
751f8b26ac
Transactions
...
* dsl, state checks
* define transaction sql commands in connection
2016-12-13 16:47:23 -03:00