{"id":18619961,"url":"https://github.com/xtyxtyx/arango-dart","last_synced_at":"2025-04-11T02:30:57.421Z","repository":{"id":56826214,"uuid":"256645783","full_name":"xtyxtyx/arango-dart","owner":"xtyxtyx","description":"Dart driver for ArangoDB","archived":false,"fork":false,"pushed_at":"2021-06-01T04:21:41.000Z","size":44,"stargazers_count":11,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T22:44:33.792Z","etag":null,"topics":["arango","arangodb","dart","databse","db","graph-database","nosql"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/arango","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtyxtyx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-18T01:28:30.000Z","updated_at":"2025-02-23T15:54:14.000Z","dependencies_parsed_at":"2022-09-16T00:50:24.787Z","dependency_job_id":null,"html_url":"https://github.com/xtyxtyx/arango-dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtyxtyx%2Farango-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtyxtyx%2Farango-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtyxtyx%2Farango-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtyxtyx%2Farango-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtyxtyx","download_url":"https://codeload.github.com/xtyxtyx/arango-dart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329528,"owners_count":21085550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arango","arangodb","dart","databse","db","graph-database","nosql"],"created_at":"2024-11-07T04:04:18.486Z","updated_at":"2025-04-11T02:30:57.109Z","avatar_url":"https://github.com/xtyxtyx.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ArangoDB Dart Driver\n\nThe dart driver for [ArangoDB](https://www.arangodb.com/) the native multi-model database\n\n### Index\n\n- [ArangoDB Dart Driver](#arangodb-dart-driver)\n  - [Index](#index)\n  - [Quick Reference](#quick-reference)\n  - [Usage](#usage)\n  - [AQL](#aql)\n  - [Features and bugs](#features-and-bugs)\n  - [Todo](#todo)\n\n### Quick Reference\n\n| Database                                  | Collection                        | Document                    | Index                                             |\n| ----------------------------------------- | --------------------------------- | --------------------------- | ------------------------------------------------- |\n| [createDatabase][db.createDatabase]       | [create][cl.create]               | [replace][cl.replace]       | [ensureIndex][cl.ensureIndex]                     |\n| [exists][db.exists]                       | [load][cl.load]                   | [update][cl.update]         | [ensureHashIndex][cl.ensureHashIndex]             |\n| [version][db.version]                     | [unload][cl.unload]               | [bulkUpdate][cl.bulkUpdate] | [ensureSkipList][cl.ensureSkipListIndex]          |\n| [listDatabases][db.listDatabases]         | [setProperties][cl.setProperties] | [remove][cl.remove]         | [ensureGeoIndex][cl.ensureGeoIndex]               |\n| [listUserDatabases][db.listUserDatabases] | [rename][cl.rename]               | [list][cl.list]             | [ensureFulltextIndex][cl.ensureFulltextIndex]     |\n| [dropDatabase][db.dropDatabase]           | [rotate][cl.rotate]               | [save][dc.save]             | [ensurePersistentIndex][cl.ensurePersistentIndex] |\n| [truncate][db.truncate]                   | [truncate][cl.truncate]           |                             | [index][cl.index]                                 |\n| [query][db.query]                         | [drop][cl.drop]                   |                             | [indexes][cl.indexes]                             |\n| [rawQuery][db.rawQuery]                   | [ensureExists][cl.ensureExists]   |                             | [dropIndex][cl.dropIndex]                         |\n|                                           | [import][cl.import]               |                             |                                                   |\n|                                           |                                   |                             |                                                   |\n\n| Cursor                    | Simple Query                            | Transaction                                 |\n| ------------------------- | --------------------------------------- | ------------------------------------------- |\n| [count][cr.count]         | [all][cl.all]                           | [beginTransaction][db.beginTransaction]     |\n| [all][cr.all]             | [list][cl.list]                         | [listTransactions][db.listTransactions]     |\n| [next][cr.next]           | [any][cl.any]                           | [executeTransaction][db.executeTransaction] |\n| [hasNext][cr.hasNext]     | [byExample][cl.byExample]               | [exists][tx.exists]                         |\n| [nextBatch][cr.nextBatch] | [firstExample][cl.firstExample]         | [get][tx.get]                               |\n| [each][cr.each]           | [removeByExample][cl.removeByExample]   | [commit][tx.commit]                         |\n| [every][cr.every]         | [replaceByExample][cl.replaceByExample] | [abort][tx.abort]                           |\n| [some][cr.some]           | [updateByExample][cl.updateByExample]   | [run][tx.run]                               |\n| [map][cr.map]             | [lookupByKeys][cl.lookupByKeys]         |                                             |\n| [reduce][cr.reduce]       | [removeByKeys][cl.removeByKeys]         |                                             |\n| [kill][cr.kill]           |                                         |                                             |\n\n\u003e Simple Queries are deprecated from version 3.4.0 on. They are superseded by AQL queries.\n\n### Usage\n\nA simple todo example:\n\n```dart\nimport 'package:arango/arango.dart';\n\nvoid main() async {\n  final db = ArangoDatabase('http://localhost:8529');\n  db.useBasicAuth('root', 'YOUR-PASSWORD');\n\n  await db.collection('todos').ensureExists();\n  await db.collection('todos').ensureTTLIndex(['expiresAt']);\n  await db.collection('todos').ensureFulltextIndex(['content']);\n\n  await db.collection('todos').save({'content': 'Go shopping'});\n  await db.collection('todos').save({'content': 'Go home'});\n\n  final todos = await db\n      .query()\n      .line('FOR todo IN todos')\n      .line('RETURN todo.content')\n      .toList();\n\n  print('todos: $todos');\n  // -\u003e todos: [Go shopping, Go home]\n}\n```\n\nTransactions:\n```dart\nimport 'package:arango/arango.dart';\n\nvoid main() async {\n  final db = ArangoDatabase('http://localhost:8529');\n  db.useBasicAuth('root', 'YOUR-PASSWORD');\n\n  await db.collection('accounts').ensureExists();\n  await db.collection('accounts').truncate();\n\n  final txn = await db.beginTransaction(write: ['accounts']);\n  await txn.run(() =\u003e db.collection('accounts').save({'id': '1'}));\n  await txn.run(() =\u003e db.collection('accounts').save({'id': '2'}));\n  await txn.commit();\n\n  final txn2 = await db.beginTransaction(write: ['accounts']);\n  await txn2.run(() =\u003e db.collection('accounts').save({'id': '3'}));\n  await txn2.run(() =\u003e db.collection('accounts').save({'id': '4'}));\n  await txn2.abort();\n\n  final data = await db\n      .query()\n      .line('FOR account IN accounts')\n      .line('RETURN account.id')\n      .toList();\n\n  print('accounts: $data');\n  // -\u003e accounts: [1, 2]\n}\n\n```\n\nRun query:\n```dart\nimport 'package:arango/arango.dart';\n\nvoid main() async {\n  final db = ArangoDatabase('http://localhost:8529');\n  db.useBasicAuth('root', '123123');\n\n  final cursor = await db.rawQuery('FOR todo IN todos RETURN todo.title');\n  final data = await cursor.all();\n  print(data);\n\n  // or with the fluent query builder\n  final result = await db\n      .query()\n      .line('FOR todo IN todos')\n      .line('RETURN todo.title')\n      .toList();\n  print(result);\n}\n\n```\n\n### AQL\n\nThe ArangoDB Query Language (AQL) can be used to retrieve and modify data that are stored in ArangoDB.\n\nTo learn more about AQL, please refer to https://www.arangodb.com/docs/stable/aql/\n\n### Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/xtyxtyx/arango-dart/issues\n\n\n### Todo\n\n| Analyzer      | View             |\n| ------------- | ---------------- |\n| exists        | arangoSearchView |\n| get           | listViews        |\n| create        | views            |\n| drop          |                  |\n| listAnalyzers |                  |\n| analyzers     |                  |\n| analyzer      |                  |\n|               |                  |\n\n[db.beginTransaction]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/beginTransaction.html\n[db.collection]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/collection.html\n[db.collections]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/collections.html\n[db.createDatabase]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/createDatabase.html\n[db.current]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/current.html\n[db.dropDatabase]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/dropDatabase.html\n[db.edgeCollection]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/edgeCollection.html\n[db.executeTransaction]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/executeTransaction.html\n[db.exists]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/exists.html\n[db.listCollections]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/listCollections.html\n[db.listDatabases]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/listDatabases.html\n[db.listTransactions]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/listTransactions.html\n[db.listUserDatabases]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/listUserDatabases.html\n[db.login]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/login.html\n[db.query]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/query.html\n[db.rawQuery]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/rawQuery.html\n[db.transactions]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/transactions.html\n[db.truncate]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/truncate.html\n[db.useBasicAuth]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/useBasicAuth.html\n[db.useBearerAuth]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/useBearerAuth.html\n[db.useDatabase]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/useDatabase.html\n[db.version]: https://pub.dev/documentation/arango/latest/arango/ArangoDatabase/version.html\n\n[cl.all]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/all.html\n[cl.any]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/any.html\n[cl.bulkUpdate]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/bulkUpdate.html\n[cl.byExample]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/byExample.html\n[cl.checksum]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/checksum.html\n[cl.count]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/count.html\n[cl.create]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/create.html\n[cl.document]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/document.html\n[cl.documentExists]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/documentExists.html\n[cl.drop]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/drop.html\n[cl.dropIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/dropIndex.html\n[cl.ensureExists]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureExists.html\n[cl.ensureFulltextIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureFulltextIndex.html\n[cl.ensureGeoIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureGeoIndex.html\n[cl.ensureHashIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureHashIndex.html\n[cl.ensureIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureIndex.html\n[cl.ensurePersistentIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensurePersistentIndex.html\n[cl.ensureSkipListIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureSkipListIndex.html\n[cl.ensureTTLIndex]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/ensureTTLIndex.html\n[cl.exists]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/exists.html\n[cl.figures]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/figures.html\n[cl.firstExample]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/firstExample.html\n[cl.get]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/get.html\n[cl.getResponsibleShard]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/getResponsibleShardb.html\n[cl.import]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/import.html\n[cl.index]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/index.html\n[cl.indexes]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/indexes.html\n[cl.list]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/list.html\n[cl.load]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/loadb.html\n[cl.lookupByKeys]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/lookupByKeys.html\n[cl.properties]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/properties.html\n[cl.remove]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/remove.html\n[cl.removeByExample]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/removeByExample.html\n[cl.removeByKeys]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/removeByKeys.html\n[cl.rename]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/rename.html\n[cl.replace]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/replace.html\n[cl.replaceByExample]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/replaceByExample.html\n[cl.revision]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/revision.html\n[cl.rotate]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/rotate.html\n[cl.setProperties]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/setProperties.html\n[cl.truncate]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/truncate.html\n[cl.unload]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/unloadb.html\n[cl.update]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/update.html\n[cl.updateByExample]: https://pub.dev/documentation/arango/latest/arango/ArangoCollection/updateByExample.html\n\n[dc.save]: https://pub.dev/documentation/arango/latest/arango/ArangoDocumentCollection/save.html\n\n[cr.all]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/all.html\n[cr.each]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/each.html\n[cr.every]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/every.html\n[cr.kill]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/kill.html\n[cr.map]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/map.html\n[cr.next]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/next.html\n[cr.nextBatch]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/nextBatch.html\n[cr.reduce]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/reduce.html\n[cr.some]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/some.html\n[cr.count]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/count.html\n[cr.hasNext]: https://pub.dev/documentation/arango/latest/arango/ArangoCursor/hasNext.html\n\n[tx.abort]: https://pub.dev/documentation/arango/latest/arango/ArangoTransaction/abort.html\n[tx.commit]: https://pub.dev/documentation/arango/latest/arango/ArangoTransaction/commit.html\n[tx.exists]: https://pub.dev/documentation/arango/latest/arango/ArangoTransaction/exists.html\n[tx.get]: https://pub.dev/documentation/arango/latest/arango/ArangoTransaction/get.html\n[tx.run]: https://pub.dev/documentation/arango/latest/arango/ArangoTransaction/run.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtyxtyx%2Farango-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtyxtyx%2Farango-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtyxtyx%2Farango-dart/lists"}