Skip to content
Merged
Changes from all commits
Commits
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
Allow configuring schema property for existing collections
  • Loading branch information
153957 authored Sep 1, 2020
commit c4df3813a9d76c0eb6d1774e7adc6d873b27cc26
6 changes: 5 additions & 1 deletion arango/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,22 @@ def response_handler(resp):

return self._execute(request, response_handler)

def configure(self, sync=None):
def configure(self, sync=None, schema=None):
"""Configure collection properties.

:param sync: Block until operations are synchronized to disk.
:type sync: bool
:param schema: document schema for validation of objects.
:type schema: dict
:return: New collection properties.
:rtype: dict
:raise arango.exceptions.CollectionConfigureError: If operation fails.
"""
data = {}
if sync is not None:
data['waitForSync'] = sync
if schema is not None:
data['schema'] = schema

request = Request(
method='put',
Expand Down