DbClient class

Constructors

DbClient({String scheme = 'http', String host = 'localhost', int port = 8529, String db = '_system', required String user, required String pass, String realm = '', SecurityContext? securityContext})
DbClient.fromConnectionString(String connectionString, {SecurityContext? securityContext})
factory

Properties

db String
final
dbUrls List<Uri>
final
hashCode int
The hash code for this object.
no setterinherited
httpClient HttpClient
getter/setter pair
liveUrlIX int
getter/setter pair
pass String
final
realm String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
securityContext SecurityContext?
final
user String
final

Methods

abortTransaction(Transaction transaction) Future<Transaction>
Aborts a transaction https://www.arangodb.com/docs/stable/http/transaction-stream-transaction.html#abort-transaction
allCollections() Future<List<CollectionInfo>>
Reads all collections https://www.arangodb.com/docs/3.4/http/collection-getting.html#reads-all-collections
beginTransaction(TransactionOptions options) Future<Transaction>
Begins a transaction https://www.arangodb.com/docs/stable/http/transaction-stream-transaction.html#begin-a-transaction
collectionChecksum(String collectionName) Future<CollectionInfo>
Returns checksum for the collection https://www.arangodb.com/docs/3.4/http/collection-getting.html#return-checksum-for-the-collection
collectionInfo(String name) Future<CollectionInfo>
Gets id, name, status of collection https://www.arangodb.com/docs/3.4/http/collection-getting.html#return-information-about-a-collection
collectionProperties(String name) Future<CollectionPropertiesResult>
Get collection properties See https://www.arangodb.com/docs/3.4/http/collection-getting.html#read-properties-of-a-collection for details
collectionRevisionId(String collectionName) Future<CollectionPropertiesResult>
Returns collection revision id https://www.arangodb.com/docs/3.4/http/collection-getting.html#return-collection-revision-id
collectionStatistics(String collectionName) Future<CollectionPropertiesResult>
Returns statistics for a collection https://www.arangodb.com/docs/3.4/http/collection-getting.html#return-statistics-for-a-collection
commitTransaction(Transaction transaction) Future<Transaction>
Commits a transaction https://www.arangodb.com/docs/stable/http/transaction-stream-transaction.html#commit-transaction
createCollection(CollectionCriteria criteria) Future<CollectionPropertiesResult>
Creates a collection See https://www.arangodb.com/docs/3.4/http/collection-creating.html for details.
createDatabase(CreateDatabaseInfo databaseInfo) Future<bool>
Creates a database. The data with these properties is required:
createDocument(String collectionName, Map<String, dynamic> data, {Transaction? transaction}) Future<DocumentOperationResult>
Creates document https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#create-document
createDocuments(String collectionName, List<Map<String, dynamic>> data, {Transaction? transaction}) Future<List<DocumentOperationResult>>
createPersistentIndex(IndexCriteria criteria) Future<IndexInfo>
Creates an index See https://www.arangodb.com/docs/devel/http/indexes-working-with.html for details.
createTtlIndex(TtlIndexCriteria criteria) Future<IndexInfo>
Creates an index See https://www.arangodb.com/docs/devel/http/indexes-working-with.html for details.
currentDatabase() Future<DbInfoResult>
Retrieves information about the current database https://www.arangodb.com/docs/devel/http/database-database-management.html#information-of-the-database
documentsCount(String collectionName, {Transaction? transaction}) Future<CollectionPropertiesResult>
Returns number of documents in a collection https://www.arangodb.com/docs/3.4/http/collection-getting.html#return-number-of-documents-in-a-collection
dropCollection(String name, {bool isSystem = false}) Future<String>
Drops a collection https://www.arangodb.com/docs/stable/http/collection-creating.html#drops-a-collection
dropDatabase(String name) Future<bool>
Drops the database along with all data stored in it. https://www.arangodb.com/docs/devel/http/database-database-management.html#drop-database
existingDatabases() Future<List<String>>
Retrieves the list of all existing databases (availabe or not) https://www.arangodb.com/docs/devel/http/database-database-management.html#list-of-databases
getDocumentByKey(String collection, String documentKey, {String? ifNoneMatchRevision, String? ifMatchRevision, Transaction? transaction}) Future<Map<String, dynamic>>
Reads a single document https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#read-document
getTransaction(String id) Future<Transaction>
Gets a transaction status https://www.arangodb.com/docs/stable/http/transaction-stream-transaction.html#get-transaction-status
newQuery() DbQueryWithClient
Creates new DbQueryWithClient (with saved link to client) object for continue to constructing it later.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryToList(Map<String, Object> data, {Transaction? transaction}) Future<List<Map<String, dynamic>>>
Makes query to ArangoDB batabase, collect results in memory and return as List. If result has error - throws error.
queryToStream(Map<String, Object> data, {Transaction? transaction}) Stream<Map<String, dynamic>>
removeDocument(String collectionName, String documentKey, {String? ifMatchRevision, Map<String, dynamic> queryParams = const {}, Transaction? transaction}) Future<DocumentOperationResult>
Removes a document https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#removes-a-document
removeDocuments(String collectionName, List<Map<String, dynamic>> data, {Map<String, dynamic> queryParams = const {}, Transaction? transaction}) Future<List<DocumentOperationResult>>
td: Removes multiple documents https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#removes-multiple-documents
replaceDocument(String collectionName, String documentKey, Map<String, dynamic> data, {String? ifMatchRevision, Map<String, dynamic> queryParams = const {}, Transaction? transaction}) Future<DocumentOperationResult>
Replaces document https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#replace-document
replaceDocuments(String collectionName, List<Map<String, dynamic>> data, {Map<String, dynamic> queryParams = const {}, Transaction? transaction}) Future<List<DocumentOperationResult>>
Replaces multiple documents https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#replace-documents
toString() String
A string representation of this object.
inherited
transactions() Future<List<Transaction>>
Gets currently running transactions https://www.arangodb.com/docs/stable/http/transaction-stream-transaction.html#list-currently-ongoing-transactions
truncateCollection(String name, {Transaction? transaction}) Future<CollectionInfo>
Truncates a collection
updateDocument(String collectionName, String documentKey, Map<String, dynamic> data, {String? ifMatchRevision, Map<String, dynamic> queryParams = const {}, Transaction? transaction}) Future<DocumentOperationResult>
Updates a document https://www.arangodb.com/docs/3.4/http/document-working-with-documents.html#update-document
userDatabases() Future<List<String>>
List of accessible databases for current user https://www.arangodb.com/docs/devel/http/database-database-management.html#list-of-accessible-databases

Operators

operator ==(Object other) bool
The equality operator.
inherited