Yaraslau Zhylko
412bdd6401
fix: all_pks() for complex keys ( #471 )
...
* fix: all_pks for complex keys
* fix tests
* more fixes
* support Python below 3.9+
* black
* linter again
2023-02-12 13:57:27 +02:00
dvora-h
f77c21a059
Add support for count
( #397 )
...
* add count
* update poetry
2022-10-18 15:17:00 +03:00
dvora-h
e9529e35be
Fix crash when trying to delete non-existent record ( #372 )
2022-09-15 13:29:31 +03:00
Mahmoud Harmouch
551429c01a
Allow users to define a new primary key. ( #347 )
...
* make primary key programmable
Signed-off-by: wiseaidev <business@wiseai.dev>
* get primary key field using the `key` method
Signed-off-by: wiseaidev <business@wiseai.dev>
* adjust delete_many & expire methods
Signed-off-by: wiseaidev <business@wiseai.dev>
* fix query for int primary key
Signed-off-by: wiseaidev <business@wiseai.dev>
* fix grammar
Signed-off-by: wiseaidev <business@wiseai.dev>
* add unit tests
Signed-off-by: wiseaidev <business@wiseai.dev>
Signed-off-by: wiseaidev <business@wiseai.dev>
Co-authored-by: Chayim <chayim@users.noreply.github.com>
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
2022-09-08 14:38:49 +03:00
dvora-h
57608d85f4
Replace execute_command
with specific redis functions when possible ( #346 )
...
* replace execute_command
* change to root_path
2022-08-22 18:04:10 +03:00
dvora-h
a00a68b414
Add delete_many
to support for bulk deletes ( #305 )
...
* Add support for bulk deletes
* linters
* linters
* fix review comments
* update more-itertools version
* poetry fix - maybe?
* merge main & add more-itertools 8.14.0
* update poetry.lock
* linters
* fix test
Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
2022-08-10 16:22:27 +03:00
Serhii Charykov
4661459ddd
Migrate from aioredis to redis-py with asyncio support ( #233 )
...
* Migrate from aioredis to redis with asyncio support
Add test for redis type
Fix imports from wrong module (for tests_sync)
* fixing merge conflicts and up to dating the lock file
Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
2022-08-10 15:21:13 +03:00
Mahmoud Harmouch
e5e887229a
Implement page function ( #339 )
...
* implement page function
Signed-off-by: wiseaidev <business@wiseai.dev>
* add unit tests
Signed-off-by: wiseaidev <business@wiseai.dev>
* fix linter issues
Signed-off-by: wiseaidev <business@wiseai.dev>
2022-08-10 14:04:27 +03:00
Mahmoud Harmouch
ac6a75be19
fixed a potential bug ( #337 )
...
* fixed a potential bug
Signed-off-by: wiseaidev <business@wiseai.dev>
* add unit tests
Signed-off-by: wiseaidev <business@wiseai.dev>
* remove unnecessary logic related to six module
Signed-off-by: wiseaidev <business@wiseai.dev>
* remove six from dependencies
Signed-off-by: wiseaidev <business@wiseai.dev>
* pass "ignore" as a kwarg
Signed-off-by: wiseaidev <business@wiseai.dev>
* get rid of try catch and simplify logic
Signed-off-by: wiseaidev <business@wiseai.dev>
* rm poetry.lock
Signed-off-by: wiseaidev <business@wiseai.dev>
* rm poetry.lock
Signed-off-by: wiseaidev <business@wiseai.dev>
* run black
Signed-off-by: wiseaidev <business@wiseai.dev>
* fix mypy issue
Signed-off-by: wiseaidev <business@wiseai.dev>
* adjust other tests accordingly
Signed-off-by: wiseaidev <business@wiseai.dev>
2022-08-09 17:40:27 +03:00
Serhii Charykov
85540c02bd
Implement temporary workaround from unasync package
2022-05-01 18:18:01 +03:00
Serhii Charykov
490fcec1a7
Fix DeprecationWarning '@pytest.fixture'
2022-05-01 17:27:06 +03:00
Serhii Charykov
838a712d57
Remove deletion logic duplication
2022-04-27 20:11:44 +03:00
Serhii Charykov
0ae8ef882e
Refactoring
2022-04-27 20:01:17 +03:00
Serhii Charykov
56f1d35de9
lint & format
2022-04-27 19:47:54 +03:00
Serhii Charykov
5016f739dd
Fix ordering in test_full_text_search_queries
2022-04-27 19:42:18 +03:00
Serhii Charykov
675722b221
Add redis "barrier" in cleanup_keys
...
To prevent pytest-xdist workers stomping each other with _delete_test_keys
2022-04-27 19:41:07 +03:00
Simon Prickett
e5c6c0494a
Adds test for first() on hashes.
2022-04-25 13:26:27 +01:00
Simon Prickett
eefa5a9f42
Added test for HashModel all_pks()
2022-04-12 11:50:02 +01:00
Simon Prickett
274ff788b1
Adds all_pks() method and test.
2022-04-12 11:31:09 +01:00
Simon Prickett
b42e63606a
Adds expire and test.
2022-03-29 22:15:05 +01:00
Simon Prickett
6d009a0d72
Fixed linter errors, refactored delete.
2022-02-15 18:46:50 +00:00
Simon Prickett
885b24b35b
Adds delete function at a class level.
2022-02-14 20:44:49 +00:00
Simon Prickett
7fa62da881
Linter fixes.
2022-01-13 17:08:46 +00:00
Simon Prickett
954913031a
Amended schema test too.
2022-01-05 21:12:31 +00:00
Simon Prickett
8d69b59916
Adds tests for full text hash search.
2022-01-05 18:08:49 +00:00
Andrew Brookins
e4e3583006
Document some possible error messages
2021-11-26 15:25:18 -08:00
Andrew Brookins
269d44c26e
Final docs push
2021-11-24 18:12:27 -08:00
Andrew Brookins
5dee757041
Add linted change
2021-11-19 08:13:50 -08:00
Andrew Brookins
3cd22b30bf
Remove outdated comment
2021-11-12 09:37:26 -08:00
Andrew Brookins
58a798444d
Clean up test keys properly
2021-11-12 07:56:47 -08:00
Andrew Brookins
5ab53c916c
Support both sync and asyncio uses
2021-11-10 11:31:02 -08:00
Andrew Brookins
ca6ae7d6e9
Merge branch 'main' into asyncio
2021-11-09 15:59:10 -08:00
Andrew Brookins
bc441143de
Add all_pks() method to HashModel
2021-11-08 16:28:58 -08:00
Andrew Brookins
2b1994b98b
Disable features without required Redis modules
...
Some features, like querying and embedded models, require
either the RediSearch or RedisJSON modules running in Redis.
Without these modules, using these features would result
in inscrutable errors.
We now disable some tests if the Redis module required for the
test is not found in the Redis instance the tests are using,
and raise errors or log messages if the same is true during
execution of HashModel and JsonModel.
2021-11-03 12:37:12 -07:00
Andrew Brookins
1921a49059
Fix linting
2021-10-22 09:19:06 -07:00
Andrew Brookins
7c0bea751b
WIP on README
2021-10-22 08:31:08 -07:00
Andrew Brookins
09c91fb756
Add building, linting for PyPI upload
2021-10-22 06:53:39 -07:00
Andrew Brookins
c9967b0d40
Rename to redis_om
2021-10-22 06:36:15 -07:00
Andrew Brookins
b2c2dd9f6f
WIP on async - test failure due to closed event loop
2021-10-22 06:33:05 -07:00
Andrew Brookins
0f9f7aa868
Attempt run-time change of type annotations on model fields
2021-10-21 13:12:54 -07:00
Andrew Brookins
7155b9af35
Lint
2021-10-20 23:31:11 -07:00
Andrew Brookins
2ffd4e6f5a
Run tests across multiple cores/CPUs
2021-10-20 23:24:31 -07:00
Andrew Brookins
49654eeede
Refine connection strings (dotenv), Makefile targets
2021-10-20 14:29:31 -07:00
Andrew Brookins
d2fa4c586f
Add Makefile, black, reformat with black
2021-10-20 13:01:46 -07:00
Andrew Brookins
2bd71ff087
Rename orm module to om
2021-10-19 15:06:57 -07:00
Andrew Brookins
c51a071982
Tests & errors for preview list limitations
2021-10-18 21:16:48 -07:00
Andrew Brookins
389a6ea878
Add support for IN queries
2021-10-13 17:16:20 -07:00
Andrew Brookins
bb08fb9eb5
Use a default value for the "embedded" config
2021-10-13 12:58:10 -07:00
Andrew Brookins
e59e210834
Avoid adding same parent to attr multiple times
2021-10-13 10:07:13 -07:00
Andrew Brookins
ae8baa0339
Fix JSON paths for arrays
2021-10-13 08:12:22 -07:00