createCollection method
Creates a collection See https://www.arangodb.com/docs/3.4/http/collection-creating.html for details.
Implementation
Future<CollectionPropertiesResponse> createCollection(
CollectionCriteria criteria) async {
final keyOptions = criteria.keyOptions;
final answer = await _httpPost([
'_db',
db,
'_api',
'collection'
], {
'name': criteria.name,
'waitForSync': criteria.waitForSync,
'type': _typeFromCollectionType(criteria.collectionType),
if (keyOptions != null) 'keyOptions': keyOptions.toMap()
});
final ret = _toCollectionPropertiesResult(answer);
return ret;
}