File tree 4 files changed +14
-9
lines changed
4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
## CHANGELOG
2
2
3
- ### Unreleased
3
+ ### v0.2.0
4
4
5
5
#### Added
6
6
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ from postgrest_py import PostgrestClient
30
30
31
31
async def main ():
32
32
async with PostgrestClient(" http://localhost:3000" ) as client:
33
- r = await client.from_(" countries" ).select(" *" )
33
+ r = await client.from_(" countries" ).select(" *" ).execute()
34
34
countries = r.json()
35
35
36
36
asyncio.run(main())
@@ -39,23 +39,28 @@ asyncio.run(main())
39
39
### Create
40
40
41
41
``` py
42
- await client.from_(" countries" ).insert({
43
- " name" : " Việt Nam" ,
44
- " capital" : " Hà Nội" ,
45
- })
42
+ await client.from_(" countries" ).insert({ " name" : " Việt Nam" , " capital" : " Hà Nội" }).execute()
46
43
```
47
44
48
45
### Read
49
46
50
47
``` py
51
- r = await client.from_(" countries" ).select(" id" , " name" )
48
+ r = await client.from_(" countries" ).select(" id" , " name" ).execute()
52
49
countries = r.json()
53
50
```
54
51
55
52
### Update
56
53
54
+ ``` py
55
+ await client.from_(" countries" ).eq(" name" , " Việt Nam" ).update({" capital" : " Hà Nội" }).execute()
56
+ ```
57
+
57
58
### Delete
58
59
60
+ ``` py
61
+ await client.from_(" countries" ).eq(" name" , " Việt Nam" ).delete().execute()
62
+ ```
63
+
59
64
### General filters
60
65
61
66
### Stored procedures (RPC)
Original file line number Diff line number Diff line change 1
- __version__ = "0.1.1 "
1
+ __version__ = "0.2.0 "
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " postgrest_py"
3
- version = " 0.1.1 "
3
+ version = " 0.2.0 "
4
4
description = " PostgREST client for Python. This library provides an ORM interface to PostgREST."
5
5
authors = [
" Lương Quang Mạnh <[email protected] >" ]
6
6
license = " MIT"
You can’t perform that action at this time.
0 commit comments