This repository was archived by the owner on Sep 8, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 64
add or filter along with tests #355
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
360bf4e
add or filter along with tests
silentworks 72f4b69
add or filter along with tests (Sourcery refactored) (#356)
sourcery-ai[bot] 840a396
add reference table test for the or method
silentworks fe3cb7f
add tests for or in and contains
silentworks a3d4210
update dependencies
silentworks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
CREATE TABLE public.countries ( | ||
id int8 PRIMARY KEY, | ||
iso CHAR (2) NOT NULL, | ||
country_name VARCHAR (80) NOT NULL, | ||
nicename VARCHAR (80) NOT NULL, | ||
iso3 CHAR (3) DEFAULT NULL, | ||
numcode SMALLINT DEFAULT NULL, | ||
phonecode INT NOT NULL | ||
); | ||
|
||
INSERT INTO public.countries (id, iso, country_name, nicename, iso3, numcode, phonecode) VALUES | ||
(1, 'AF', 'AFGHANISTAN', 'Afghanistan', 'AFG', 4, 93), | ||
(2, 'AL', 'ALBANIA', 'Albania', 'ALB', 8, 355), | ||
(3, 'DZ', 'ALGERIA', 'Algeria', 'DZA', 12, 213), | ||
(4, 'AQ', 'ANTARCTICA', 'Antarctica', NULL, NULL, 0), | ||
(5, 'CR', 'COSTA RICA', 'Costa Rica', 'CRI', 188, 506), | ||
(6, 'ES', 'SPAIN', 'Spain', 'ESP', 724, 34), | ||
(7, 'TH', 'THAILAND', 'Thailand', 'THA', 764, 66), | ||
(8, 'TG', 'TOGO', 'Togo', 'TGO', 768, 228), | ||
(9, 'TT', 'TRINIDAD AND TOBAGO', 'Trinidad and Tobago', 'TTO', 780, 1868), | ||
(10, 'GB', 'UNITED KINGDOM', 'United Kingdom', 'GBR', 826, 44), | ||
(11, 'US', 'UNITED STATES', 'United States', 'USA', 840, 1), | ||
(12, 'ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716, 263); | ||
|
||
create table public.cities ( | ||
id int8 primary key, | ||
country_id int8 not null references public.countries, | ||
name text | ||
); | ||
|
||
insert into public.cities (id, name, country_id) values | ||
(1, 'London', 10), | ||
(2, 'Manchester', 10), | ||
(3, 'Liverpool', 10), | ||
(4, 'Bristol', 10), | ||
(5, 'Miami', 11), | ||
(6, 'Huston', 11), | ||
(7, 'Atlanta', 11); | ||
|
||
create table public.users ( | ||
id int8 primary key, | ||
name text, | ||
address jsonb | ||
); | ||
|
||
insert into public.users (id, name, address) values | ||
(1, 'Michael', '{ "postcode": 90210, "street": "Melrose Place" }'), | ||
(2, 'Jane', '{}'); | ||
|
||
create table public.reservations ( | ||
id int8 primary key, | ||
room_name text, | ||
during tsrange | ||
); | ||
|
||
insert into public.reservations (id, room_name, during) values | ||
(1, 'Emerald', '[2000-01-01 13:00, 2000-01-01 15:00)'), | ||
(2, 'Topaz', '[2000-01-02 09:00, 2000-01-02 10:00)'); | ||
|
||
|
||
create table public.issues ( | ||
id int8 primary key, | ||
title text, | ||
tags text[] | ||
); | ||
|
||
insert into public.issues (id, title, tags) values | ||
(1, 'Cache invalidation is not working', array['is:open', 'severity:high', 'priority:low']), | ||
(2, 'Use better names', array['is:open', 'severity:low', 'priority:medium']), | ||
(3, 'Add missing postgrest filters', array['is:open', 'severity:low', 'priority:high']), | ||
(4, 'Add alias to filters', array['is:closed', 'severity:low', 'priority:medium']); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "postgrest" | ||
version = "0.13.2" | ||
description = "PostgREST client for Python. This library provides an ORM interface to PostgREST." | ||
authors = ["Lương Quang Mạnh <[email protected]>", "Joel Lee <[email protected]>", "Anand", "Oliver Rice"] | ||
authors = ["Lương Quang Mạnh <[email protected]>", "Joel Lee <[email protected]>", "Anand", "Oliver Rice", "Andrew Smith <[email protected]>"] | ||
homepage = "https://github.com/supabase-community/postgrest-py" | ||
repository = "https://github.com/supabase-community/postgrest-py" | ||
documentation = "https://postgrest-py.rtfd.io" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from postgrest import AsyncPostgrestClient | ||
|
||
REST_URL = "http://127.0.0.1:3000" | ||
|
||
|
||
def rest_client(): | ||
return AsyncPostgrestClient( | ||
base_url=REST_URL, | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.