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