Commit graph

28 commits

Author SHA1 Message Date
Marián Hlaváč
c68adacea2
Use TypeVars for return types of RedisModel and its subtype's methods (#476)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
2023-07-12 11:08:20 +03:00
Reinier van der Leer
89b6c84c4a
Add support for KNN vector similarity search (#513)
Co-authored-by: Chayim <chayim@users.noreply.github.com>
2023-07-12 11:03:53 +03:00
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
tonibofarull
9e17678094
Fix None instance when querying (#368)
Fix None instance
2022-09-08 13:53:00 +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
Simon Prickett
3f91f9e941
Updating default page size to 1000 from 10 (#282)
Fixed page size problem with `all()`

The default page size for `all` is supposed to be 1000 not 10, for performance reasons.  When I changed the constant `DEFAULT_PAGE_SIZE` a while back, I seem to have forgotten to have changed it here.  This fixes that.
2022-08-09 15:19:04 +03:00
Simon Prickett
129ef956b8 Performance improvement for first - avoids unnecessary pagination. 2022-04-25 13:05:11 +01:00
Simon Prickett
32b0774053 Fixed typo in error message. 2022-04-22 17:29:26 +01:00
Simon Prickett
fd151fc322 Updated page size to 1000 from 10. 2022-04-22 13:17:25 +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
800ec69565
Attempts to fix full text search fields
Adds field name alias to fix full text searches.

Closes #42
2021-12-09 23:11:15 +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
321b356140 Switch to using Protocols with typing_extensions 2021-11-24 13:53:54 -08:00
Andrew Brookins
1e40eb1649 Fix Python 3.7 compatibility 2021-11-24 13:38:35 -08:00
Andrew Brookins
a0f10cc056 Remove unused Protocol import 2021-11-19 08:10:38 -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