mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
bump: sdk examples.
This commit is contained in:
1 parent
6a5ffb2e82
commit
8632f3360f
29 files changed
+54
-45
No files matched your search
@@ -1,6 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.tables import Tables
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import IndexType
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -13,7 +13,7 @@ result = tables.create_index(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
type = .KEY,
|
||||
type = IndexType.KEY,
|
||||
columns = [],
|
||||
orders = [], # optional
|
||||
lengths = [] # optional
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from appwrite.client import Client
|
||||
from appwrite.services.tables import Tables
|
||||
from appwrite.enums import
|
||||
from appwrite.enums import RelationshipType
|
||||
|
||||
client = Client()
|
||||
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
||||
@@ -13,9 +13,9 @@ result = tables.create_relationship_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
related_table_id = '<RELATED_TABLE_ID>',
|
||||
type = .ONETOONE,
|
||||
type = RelationshipType.ONETOONE,
|
||||
two_way = False, # optional
|
||||
key = '', # optional
|
||||
two_way_key = '', # optional
|
||||
on_delete = .CASCADE # optional
|
||||
on_delete = RelationMutate.CASCADE # optional
|
||||
)
|
||||
@@ -12,6 +12,6 @@ result = tables.update_relationship_column(
|
||||
database_id = '<DATABASE_ID>',
|
||||
table_id = '<TABLE_ID>',
|
||||
key = '',
|
||||
on_delete = .CASCADE, # optional
|
||||
on_delete = RelationMutate.CASCADE, # optional
|
||||
new_key = '' # optional
|
||||
)
|
||||
Reference in new issue
Block a user