Friedrich Lindenberg
07ef8d22c1
Remove duplicate function
2020-06-28 21:09:09 +02:00
Friedrich Lindenberg
37c0f87d10
Adopt banal for utility functions
2020-06-28 18:58:00 +02:00
Friedrich Lindenberg
8dede2b757
Bump version: 1.3.1 → 1.3.2
2020-06-28 15:51:21 +02:00
Friedrich Lindenberg
439e14f421
Remove table from db cache, fixes #329 .
2020-06-28 15:47:48 +02:00
Friedrich Lindenberg
17fffe78c2
Create tables only when ensure_schema=True. Fixes #330 .
2020-06-28 15:44:42 +02:00
Friedrich Lindenberg
2637254bcf
Catch closed RP, fixes #334 .
2020-06-28 15:02:20 +02:00
Friedrich Lindenberg
0c46d9eead
Bump version: 1.3.0 → 1.3.1
2020-04-06 23:10:26 +02:00
Friedrich Lindenberg
9cbdb3772c
A bit of cleanup
2020-04-06 22:56:35 +02:00
Friedrich Lindenberg
507b0a5a40
Merge pull request #321 from benfasoli/master
...
Adds support for JSON and JSONB columns
2020-04-06 22:44:48 +02:00
Friedrich Lindenberg
7cc0740bc0
Fix lint
2020-04-06 22:38:28 +02:00
Friedrich Lindenberg
38a5ad9b83
Merge pull request #323 from byron10000/master
...
Add two clauses which are 'startswith' and 'enswith'
2020-04-06 15:34:12 +02:00
byron10000
412b80f13c
add two clauses which are 'startswith' and 'enswith'
2020-04-06 10:26:16 +08:00
Ben Fasoli
7fee6da44d
Adds support for JSONB in PostgresQL
...
Passes dialect to instances of `Types` for vendor-specific type mappings.
2020-03-25 20:29:58 -07:00
Ben Fasoli
aeaab50043
Adds support to serialize dict as JSON
...
There are likely some vendor-specific enhancements (such as `JSONB` in PostgreSQL) but the current method of type guessing doesn't know anything about the underlying database.
2020-03-25 19:35:36 -07:00
Ben Fasoli
d51fcb604f
Replace cls argument with self
...
Not sure if this was originally intended to be a `@classmethod` but it's now written and called as a method bound to an instance of the class.
2020-03-25 18:51:56 -07:00
Friedrich Lindenberg
0a32b89c01
Bump version: 1.2.3 → 1.3.0
2020-03-15 14:07:19 +01:00
Friedrich Lindenberg
2677bc04c6
Add lint, remove travis
2020-03-15 13:54:34 +01:00
Friedrich Lindenberg
5212bcb787
Try to be clever about service ports
2020-03-15 13:44:43 +01:00
Friedrich Lindenberg
c0177a850f
Add MariaDB
2020-03-15 13:40:06 +01:00
Friedrich Lindenberg
dd286b33da
Add postgresql
2020-03-15 13:29:39 +01:00
Friedrich Lindenberg
7749574264
Dev dependencies
2020-03-15 13:24:19 +01:00
Friedrich Lindenberg
666c8185c8
Begin migrating to GitHub Actions
2020-03-15 13:15:31 +01:00
Friedrich Lindenberg
0600f3eb43
Merge pull request #315 from mynameisfiber/feat/chunked-update
...
Added ChunkedUpdate to leverage `update_many`
2020-03-15 12:48:02 +01:00
Friedrich Lindenberg
c84ea316db
Merge pull request #314 from mynameisfiber/feat/chunked-callback
...
Add optional callback to ChunkedInsert
2020-03-15 12:46:38 +01:00
Micha Gorelick
ff98cfc5d4
Added ChunkedUpdate to leverage update_many
...
The ChunkedInsert object is great for speeding up inserts. This commit
does the same for updates. It chunks up updates then sends them to the
table's `update_many` in bundles that contain updates to the same
fields.
In doing this the ChunkedInsert and new ChunkedUpdate were refactored to
inherit from a common `_Chunker` object that does most of the chunking
logic. This should also make it simple to add a ChunkedUpsert object.
2020-03-13 19:00:54 +01:00
Micha Gorelick
03b7532997
fix flake8 errors
2020-03-13 15:05:07 +01:00
Micha Gorelick
a9a15966e2
Add optional callback to ChunkedInsert
...
This commit adds an optional `callback` argument to the `ChunkedInsert`
object. This callback is a callable object which gets called before the
chunked insert happens. This is useful for clearing any local caches
that may be in place to deal with the eventual consistency resulting
from the delayed nature of the chunked inserts.
For example,
```
cache = set()
chunked_table = ChunkedInsert(table, callback=lambda queue: cache.clear())
while True:
data = get_data_id()
key = data['key']
if key in cache or table.find_one(key=key)
continue
cache.add(key)
chunked_table.insert(data)
```
2020-03-13 14:29:03 +01:00
Friedrich Lindenberg
73ff374513
Bump version: 1.2.2 → 1.2.3
2020-03-10 16:28:52 -05:00
Friedrich Lindenberg
a513888824
Lock column updates
2020-03-10 16:28:35 -05:00
Friedrich Lindenberg
894819fe99
Bump version: 1.2.1 → 1.2.2
2020-02-24 18:27:42 +01:00
Friedrich Lindenberg
7291cf5ca0
Merge pull request #313 from Frankkkkk/master
...
Fix race condition when getting column keys of new table
2020-02-24 15:46:04 +01:00
Frank Villaro-Dixon
b6ed0587ed
Fix race condition when getting column keys of new table
...
_columns_keys() sets _columns to {}, but _sync_table() empties _columns
when table is empty.
2020-02-24 13:02:31 +01:00
Friedrich Lindenberg
c01e717436
Bump version: 1.2.0 → 1.2.1
2020-02-23 19:17:20 +01:00
Friedrich Lindenberg
72ecf561fe
Make column lookups properly case-insensitive, refs #310 .
2020-02-23 19:13:34 +01:00
Friedrich Lindenberg
5ddff753b7
Bump version: 1.1.2 → 1.2.0
2020-01-11 16:50:39 +01:00
Friedrich Lindenberg
e7b212b589
Fix up changelog a bit
2020-01-11 16:50:30 +01:00
Friedrich Lindenberg
b362f25816
Use default pool for Sqlite, refs #283 , #163 .
2020-01-11 16:47:01 +01:00
Friedrich Lindenberg
354a51bf98
Add support for database views, fixes #235 , fixes #267 .
2020-01-11 16:46:04 +01:00
Friedrich Lindenberg
fc3af9e1f1
Fix memory leak, fixes #226 .
2020-01-11 15:01:22 +01:00
Friedrich Lindenberg
71b9421d60
Document ensure_schema behaviour, fixes #225 .
2020-01-11 14:38:21 +01:00
Friedrich Lindenberg
39385b7e0a
Make has_column case insensitive, refs #270 .
2020-01-11 14:31:51 +01:00
Friedrich Lindenberg
9b1f8ea649
Simplify
2020-01-11 14:31:07 +01:00
Friedrich Lindenberg
45ae60349c
Remove use of six because its 2020
2020-01-11 14:06:57 +01:00
Friedrich Lindenberg
ce28a0d4e8
Pass through column arguments, fixes #233 , #266 .
2020-01-11 13:55:57 +01:00
Friedrich Lindenberg
e766fa25f0
Fix incorrect query generation, fixes #290 .
2020-01-11 13:47:34 +01:00
Friedrich Lindenberg
d7f23933f1
Fix doc error, fixes #297 .
2020-01-11 13:36:28 +01:00
Friedrich Lindenberg
d0c4e9fcc7
Implement method to close database connections, fixes #246 .
2020-01-11 13:16:30 +01:00
Friedrich Lindenberg
00d2279abf
Split _args_to_clause into two functions
2020-01-11 13:02:32 +01:00
Friedrich Lindenberg
5a93c61bf6
Merge pull request #302 from jsalsman/patch-2
...
allow for ilike clauses
2020-01-11 12:48:13 +01:00
Friedrich Lindenberg
bd70c2aa9e
Merge pull request #301 from abmyii/more_find_operators
...
Implement additional find operators (and relevant tests)
2020-01-11 12:43:29 +01:00