Friedrich Lindenberg
a75b7c4c93
Fix linting issue
2021-04-22 18:54:19 +02:00
Friedrich Lindenberg
c13b79fc59
Try to fix #365 .
2021-04-22 18:51:27 +02:00
Joshua Branch
ed3b120f85
Fixes pudo/dataset#363 by tracking checked-out sqlalchemy database connections, on a per-thread basis, and closing all connections when Database.close() is called.
2021-03-10 00:35:04 -05:00
Friedrich Lindenberg
2791a61939
Bump version: 1.4.4 → 1.4.5
2021-02-08 11:37:18 +01:00
Kapil Yedidi
1f16e6eb34
made requested changes
2021-02-02 14:07:06 -08:00
Friedrich Lindenberg
fd918f06b6
Bump version: 1.4.3 → 1.4.4
2021-01-17 12:45:56 +01:00
Friedrich Lindenberg
97d67e397d
Bump version: 1.4.2 → 1.4.3
2020-12-30 22:33:06 +01:00
Friedrich Lindenberg
8325f855af
Revamp the documentation
2020-12-30 22:16:10 +01:00
Friedrich Lindenberg
02d3d0333f
Support disabling auto-increment on primary keys, fixes #351 .
2020-12-29 20:03:45 +01:00
Friedrich Lindenberg
2b1947e407
radically simplify upsert_many; refs #352 .
2020-12-29 19:34:37 +01:00
Friedrich Lindenberg
5e09aba401
Remove flush_tables, fixes #356 .
2020-12-29 18:39:44 +01:00
Friedrich Lindenberg
846b5f200a
Bump version: 1.4.1 → 1.4.2
2020-11-19 13:15:03 +01:00
Friedrich Lindenberg
3a931b7b5b
Bump version: 1.4.0 → 1.4.1
2020-11-14 23:02:17 +01:00
Friedrich Lindenberg
e82618cf4e
Bump version: 1.3.2 → 1.4.0
2020-11-14 22:58:02 +01:00
Friedrich Lindenberg
2a6a6c1e22
Remove unused arguments, fixes #343 .
2020-11-14 22:51:05 +01:00
Friedrich Lindenberg
de68e2ba2b
Re-org a little bit :)
2020-11-14 22:48:56 +01:00
Kapil Yedidi
ae3a30da19
Added WAL by default for SQLite databases
2020-10-15 10:41:58 -07:00
tatsuya4559
5d6a840740
removed freeze from __all__ listing.
2020-08-30 08:40:02 +09:00
Friedrich Lindenberg
3479e5ba35
Try and shut up MySQL about index length. Weird.
2020-08-23 13:35:48 +02:00
Friedrich Lindenberg
4034a12f62
Get rid of the flush statement, but I'm not sure this has no side effects
2020-08-23 12:30:30 +02:00
Friedrich Lindenberg
3fe0ae10aa
Seems it was that lock.
2020-08-23 12:23:00 +02:00
Friedrich Lindenberg
a17f2c8d5c
Apply black
2020-08-02 12:52:11 +02:00
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
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
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
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
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
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