{"id":20492481,"url":"https://github.com/mumez/tarandoc","last_synced_at":"2026-06-16T16:31:57.817Z","repository":{"id":147003639,"uuid":"144294793","full_name":"mumez/Tarandoc","owner":"mumez","description":"Tarantool document module wrapper based on Tarantalk","archived":false,"fork":false,"pushed_at":"2018-08-25T06:41:49.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-27T23:11:40.373Z","etag":null,"topics":["document-database","pharo","tarantalk","tarantool"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","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/mumez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-10T14:15:20.000Z","updated_at":"2018-08-25T06:41:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae29d817-d19e-4b3c-aea2-5f6e1a13cd79","html_url":"https://github.com/mumez/Tarandoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mumez/Tarandoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2FTarandoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2FTarandoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2FTarandoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2FTarandoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mumez","download_url":"https://codeload.github.com/mumez/Tarandoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumez%2FTarandoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34415240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["document-database","pharo","tarantalk","tarantool"],"created_at":"2024-11-15T17:29:17.249Z","updated_at":"2026-06-16T16:31:57.798Z","avatar_url":"https://github.com/mumez.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tarandoc\n\n[Tarantool](http://tarantool.io) [document module](https://github.com/tarantool/document) wrapper based on [Tarantalk](https://github.com/mumez/Tarantalk).\n\nIt is usable as a simple/lightweight JSON document DB.\n\n## Basic Usage\n\n```smalltalk\n\"Preparing a doc\"\ntarantalk := TrTarantalk connect: 'taran:talk@localhost:3301'.\ndogs := (tarantalk ensureSpaceNamed: 'dogs') asDocWithId.\n```\n\n```smalltalk\n\"Insert\"\ndogs insert: { 'id' -\u003e 1. 'size'-\u003e'big'. 'name'-\u003e 'aka'. 'ownerId' -\u003e 1. 'age'-\u003e1 } asDictionary.\ndogs insert: { 'id' -\u003e 2. 'size'-\u003e'small'. 'name'-\u003e 'shiro'. 'ownerId' -\u003e 1. 'age'-\u003e2 } asDictionary.\ndogs insert: { 'id' -\u003e 3. 'size'-\u003e'midium'. 'name'-\u003e 'ao'. 'ownerId' -\u003e 2. 'age'-\u003e4 } asDictionary.\ndogs insert: { 'id' -\u003e 4. 'size'-\u003e'midium'. 'name'-\u003e 'kuro'. 'ownerId' -\u003e 2. 'age'-\u003e 9 } asDictionary.\n```\n\n```smalltalk\n\"Select\"\ndogs selectWhere: [ :each | each id \u003e 0 ].\n\"-\u003e an Array(a Dictionary('age'-\u003e1 'id'-\u003e1 'name'-\u003e'aka' 'ownerId'-\u003e1 'size'-\u003e'big' ) a Dictionary('age'-\u003e2 'id'-\u003e2 'name'-\u003e'shiro' 'ownerId'-\u003e1 'size'-\u003e'small' ) a Dictionary('age'-\u003e4 'id'-\u003e3 'name'-\u003e'ao' 'ownerId'-\u003e2 'size'-\u003e'midium' ) a Dictionary('age'-\u003e9 'id'-\u003e4 'name'-\u003e'kuro' 'ownerId'-\u003e2 'size'-\u003e'midium' ))\"\n\ndogs selectWhere: [ :each | (each id \u003e 0) \u0026 (each age = 1) ].\n\"-\u003e an Array(a Dictionary('age'-\u003e1 'id'-\u003e1 'name'-\u003e'aka' 'ownerId'-\u003e1 'size'-\u003e'big' ))\"\n\ndogs selectWhere: [ :each | each name = 'aka' ] offset: 0 limit: 1.\n\"-\u003e an Array(a Dictionary('age'-\u003e1 'id'-\u003e1 'name'-\u003e'aka' 'ownerId'-\u003e1 'size'-\u003e'big' ))\"\n\n```\n\n```smalltalk\n\"Delete\"\n(dogs deleteWhere: [ :each | each name = 'kuro' ]) sync. \"wait delete ends (by default, async)\"\n(dogs countWhere: [ :each | each id \u003e 0 ]).\n\"-\u003e 3\"\n```\n\n```smalltalk\n\"Join\"\nowners := (tarantalk ensureSpaceNamed: 'owners') asDocWithId.\nowners insert: { 'id' -\u003e 1. 'surname'-\u003e'suzuki'. 'name' -\u003e 'ichiro'  } asDictionary.\n(owners insert: { 'id' -\u003e 2. 'surname'-\u003e'yamada'. 'name' -\u003e 'taro'  } asDictionary) sync.\n\ndogs joinTo: owners where: [:dog :owner | dog ownerId = owner id].\n\"-\u003e an Array(an Array(a Dictionary('age'-\u003e1 'id'-\u003e1 'name'-\u003e'aka' 'ownerId'-\u003e1 'size'-\u003e'big' ) a Dictionary('id'-\u003e1 'name'-\u003e'ichiro' 'surname'-\u003e'suzuki' )) an Array(a Dictionary('age'-\u003e2 'id'-\u003e2 'name'-\u003e'shiro' 'ownerId'-\u003e1 'size'-\u003e'small' ) a Dictionary('id'-\u003e1 'name'-\u003e'ichiro' 'surname'-\u003e'suzuki' )) an Array(a Dictionary('age'-\u003e4 'id'-\u003e3 'name'-\u003e'ao' 'ownerId'-\u003e2 'size'-\u003e'midium' ) a Dictionary('id'-\u003e2 'name'-\u003e'taro' 'surname'-\u003e'yamada' )))\"\n```\n\n```smalltalk\n\"Insert/Select nested documents\"\ntarantalk := TrTarantalk connect: 'taran:talk@localhost:3301'.\nsessions := (tarantalk ensureSpaceNamed: 'sessions') asDocWithId.\n\nsessions insert: {'id'-\u003e1. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e10. 'name'-\u003e'Suzuki'. 'address'-\u003e{'country'-\u003e'JP'} asDictionary} asDictionary} asDictionary.\nsessions insert: {'id'-\u003e2. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e11. 'name'-\u003e'Yamada'. 'address'-\u003e{'country'-\u003e'JP'} asDictionary} asDictionary} asDictionary.\n(sessions insert: {'id'-\u003e3. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e12. 'name'-\u003e'John'. 'address'-\u003e{'country'-\u003e'US'} asDictionary} asDictionary} asDictionary) sync.\n\nsessions selectWhere: [ :each | each account address country = 'JP' ].\n\"-\u003e an Array(a Dictionary('account'-\u003ea Dictionary('address'-\u003ea Dictionary('country'-\u003e'JP' ) 'id'-\u003e10 'name'-\u003e'Suzuki' ) 'expires'-\u003e3600 'id'-\u003e1 'token'-\u003e'1k9s43o7f6qw5wyybgizphqgg' ) a Dictionary('account'-\u003ea Dictionary('address'-\u003ea Dictionary('country'-\u003e'JP' ) 'id'-\u003e11 'name'-\u003e'Yamada' ) 'expires'-\u003e3600 'id'-\u003e2 'token'-\u003e'1k9s43kz03hu0yxt8eswqm78c' ))\"\n\n```\n\n```smalltalk\n\"Adding index\"\ntarantalk := TrTarantalk connect: 'taran:talk@localhost:3301'.\nsessions := (tarantalk ensureSpaceNamed: 'sessions') asDocWithId.\n\n\"Currently, need to ensure indices before insert\"\nsessions ensureIndex: 'country' partsUsing: [ :flds | (flds stringNamed: 'account.address.country') ] setting: [:opts | opts isUnique: false].\n\nsessions insert: {'id'-\u003e1. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e10. 'name'-\u003e'Suzuki'. 'address'-\u003e{'country'-\u003e'JP'} asDictionary} asDictionary} asDictionary.\nsessions insert: {'id'-\u003e2. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e11. 'name'-\u003e'Yamada'. 'address'-\u003e{'country'-\u003e'JP'} asDictionary} asDictionary} asDictionary.\n(sessions insert: {'id'-\u003e3. 'token' -\u003e UUID new asString36. 'expires' -\u003e 3600. 'account' -\u003e {'id'-\u003e12. 'name'-\u003e'John'. 'address'-\u003e{'country'-\u003e'US'} asDictionary} asDictionary} asDictionary) sync.\n\n(sessions selectWhere: [ :each | each account address country = 'JP']). \"faster\"\n\n```\n\n\n## Installation\n\n```smalltalk\nMetacello new\n  baseline: 'Tarandoc';\n  repository: 'github://mumez/Tarandoc/repository';\n  load.\n```\n\nAnd extend your tarantool with [doc module](https://github.com/tarantool/document).\n\n## Running\n\nBefore running tarantool, you need to require document module in your `script.lua` file.\n\n```lua\nbox.cfg{listen = 3301}\ndoc = require('document')\nfun = require('fun')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumez%2Ftarandoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmumez%2Ftarandoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumez%2Ftarandoc/lists"}