Skip to content

Commit 1496a84

Browse files
committed
Add order random
1 parent 5db0860 commit 1496a84

16 files changed

+21
-17
lines changed

appwrite/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def __init__(self):
1414
self._endpoint = 'https://cloud.appwrite.io/v1'
1515
self._global_headers = {
1616
'content-type': '',
17-
'user-agent' : f'AppwritePythonSDK/13.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
17+
'user-agent' : f'AppwritePythonSDK/13.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1818
'x-sdk-name': 'Python',
1919
'x-sdk-platform': 'server',
2020
'x-sdk-language': 'python',
21-
'x-sdk-version': '13.0.0',
21+
'x-sdk-version': '13.1.0',
2222
'X-Appwrite-Response-Format' : '1.8.0',
2323
}
2424

appwrite/query.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def order_asc(attribute):
7979
def order_desc(attribute):
8080
return str(Query("orderDesc", attribute, None))
8181

82+
@staticmethod
83+
def order_random():
84+
return str(Query("orderRandom", None, None))
85+
8286
@staticmethod
8387
def cursor_before(id):
8488
return str(Query("cursorBefore", None, id))

appwrite/services/tables_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2337,7 +2337,7 @@ def create_rows(self, database_id: str, table_id: str, rows: List[dict]) -> Dict
23372337
table_id : str
23382338
Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
23392339
rows : List[dict]
2340-
Array of documents data as JSON objects.
2340+
Array of rows data as JSON objects.
23412341
23422342
Returns
23432343
-------

docs/examples/databases/create-line-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ result = databases.create_line_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]] # optional
16+
default = [[1, 2], [3, 4], [5, 6]] # optional
1717
)

docs/examples/databases/create-point-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ result = databases.create_point_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]] # optional
16+
default = [1, 2] # optional
1717
)

docs/examples/databases/create-polygon-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ result = databases.create_polygon_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]] # optional
16+
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional
1717
)

docs/examples/databases/update-line-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ result = databases.update_line_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]], # optional
16+
default = [[1, 2], [3, 4], [5, 6]], # optional
1717
new_key = '' # optional
1818
)

docs/examples/databases/update-point-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ result = databases.update_point_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]], # optional
16+
default = [1, 2], # optional
1717
new_key = '' # optional
1818
)

docs/examples/databases/update-polygon-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ result = databases.update_polygon_attribute(
1313
collection_id = '<COLLECTION_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]], # optional
16+
default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional
1717
new_key = '' # optional
1818
)

docs/examples/tablesdb/create-line-column.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ result = tables_db.create_line_column(
1313
table_id = '<TABLE_ID>',
1414
key = '',
1515
required = False,
16-
default = [[1,2], [3, 4]] # optional
16+
default = [[1, 2], [3, 4], [5, 6]] # optional
1717
)

0 commit comments

Comments
 (0)