{"id":21396415,"url":"https://github.com/baslr/fastango","last_synced_at":"2025-03-16T14:42:27.862Z","repository":{"id":27968351,"uuid":"31461481","full_name":"baslr/fastango","owner":"baslr","description":"supercharged arangodb poc client | fast client for arangodb","archived":false,"fork":false,"pushed_at":"2015-03-13T00:18:04.000Z","size":164,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T19:52:20.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baslr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-28T12:06:02.000Z","updated_at":"2020-01-31T09:31:10.000Z","dependencies_parsed_at":"2022-08-01T09:18:55.568Z","dependency_job_id":null,"html_url":"https://github.com/baslr/fastango","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Ffastango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Ffastango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Ffastango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Ffastango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baslr","download_url":"https://codeload.github.com/baslr/fastango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885887,"owners_count":20363644,"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":[],"created_at":"2024-11-22T14:26:58.204Z","updated_at":"2025-03-16T14:42:27.839Z","avatar_url":"https://github.com/baslr.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"fastango\n========\nsupercharged arangodb poc client.\n\nFastango is up to 3x (save docs) and 4x (get docs) as fast as the official ArangoDB JavaScript client when it runs with TCP connection reusage and up to 6x (save docs) and 8x (get docs) as fast as the untouched version (3.3.0).\n\n![bildschirmfoto 2015-03-10 um 23 10 36](https://cloud.githubusercontent.com/assets/1494154/6588054/449f6c46-c784-11e4-9a58-6aaac94b2fd6.png)\n![bildschirmfoto 2015-03-12 um 23 29 28](https://cloud.githubusercontent.com/assets/1494154/6630478/742df1f6-c911-11e4-80b4-97afaf7138c6.png)\n\n## [Collection functions](#collections)\n## [Document functions](#documents)\n## [Misc functions](#misc)\n\n# impelentation status\n\n## drawbacks\n- not the full http api is implemented\n- all request go into the same queue. on socket error this queue will resubmited to the db -\u003e split queue to pipelined an non pipelined requests\n- no cursor iteration (possbile when async functions land in in ES7)\n\n## initialize client\n```coffeescript\nparser = new (require 'fastango/parser') 'IP', PORT\nrequire('fastango/fastango') parser, '_system', (status, fastango) -\u003e\n  if status \u003e= 400\n    'some error'\n    return\n  'now you can use fastango'\n```\n\n## database\n## _use\n```coffeescript\nfastango._use 'myDb', (status, fastango) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n\nChange the database. Note: the old fastango object points to the old db. You have to use the newly returned fastango object.\n\n## collections\n### truncate\n```coffeescript\nfastango.testCollection.truncate (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n### drop\n```coffeescript\nfastango.testCollection.drop (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n### _createDocumentCollection\n```coffeescript\nfastango._createDocumentCollection 'NAME', {options}, (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\nfor options see \u003chttps://docs.arangodb.com/HttpCollection/Creating.html\u003e\n\n## documents\n### save\n```coffeescript\nfastango.testCollection.save JSON.strinigfy({key:'value'}), (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n\n### update\n```coffeescript\nfastango.testCollection.update '_key', JSON.strinigfy({key:'value'}), {options}, (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\nfor options (optional) see \u003chttps://docs.arangodb.com/HttpDocument/WorkingWithDocuments.html\u003e (Patch document)\n\n### document\n```coffeescript\nfastango.testCollection.document '_key', (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n### count\n```coffeescript\nfastango.testCollection.count (status, heads, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n\n## misc\n### _query\n```coffeescript\nfastango._query 'FOR doc IN docs RETURN doc._key', {bindVars}, {options}, (status, cursor) -\u003e\n  if status \u003e= 400\n    'some error'\n    return\n  cursor.all (status, results) -\u003e\n    if status \u003e= 400\n      'some error'\n```\nfor options see \u003chttps://docs.arangodb.com/HttpAqlQueryCursor/AccessingCursors.html\u003e\nexample:\n\n```coffeescript\nfastango._query 'FOR doc IN docs RETURN doc._key', {}, {fullCount:true, maxPlans:1}, (status, cursor) -\u003e\n```\n\nfor the moment only `cursor.all` is supported.\n\n### _transaction\n```coffeescript\nfastango._transaction {\n  params:\n    a: 4\n  collections: ['col1', 'col2'] | # optional\n    read: ['col1', 'col2']\n    write: ['col1', 'col2']\n  waitForSync: true|false # optional\n  lockTimeout: UNUMBER # optional\n}, (params) -\u003e # the action function\n  return params.a\n, (status, headers, body) -\u003e\n  if status \u003e= 400\n    'some error'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaslr%2Ffastango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaslr%2Ffastango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaslr%2Ffastango/lists"}