Skip to content

Commit c4df381

Browse files
authored
Allow configuring schema property for existing collections
1 parent 49ddf39 commit c4df381

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arango/collection.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,18 +306,22 @@ def response_handler(resp):
306306

307307
return self._execute(request, response_handler)
308308

309-
def configure(self, sync=None):
309+
def configure(self, sync=None, schema=None):
310310
"""Configure collection properties.
311311
312312
:param sync: Block until operations are synchronized to disk.
313313
:type sync: bool
314+
:param schema: document schema for validation of objects.
315+
:type schema: dict
314316
:return: New collection properties.
315317
:rtype: dict
316318
:raise arango.exceptions.CollectionConfigureError: If operation fails.
317319
"""
318320
data = {}
319321
if sync is not None:
320322
data['waitForSync'] = sync
323+
if schema is not None:
324+
data['schema'] = schema
321325

322326
request = Request(
323327
method='put',

0 commit comments

Comments
 (0)