{"id":20564322,"url":"https://github.com/tarantool/tarantool-ruby","last_synced_at":"2025-08-24T12:48:00.672Z","repository":{"id":1983698,"uuid":"2915547","full_name":"tarantool/tarantool-ruby","owner":"tarantool","description":"Tarantool Ruby driver","archived":false,"fork":false,"pushed_at":"2022-03-14T14:13:48.000Z","size":519,"stargazers_count":40,"open_issues_count":5,"forks_count":10,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-03-22T23:04:13.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://tarantool.org","language":"Ruby","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/tarantool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-05T09:43:25.000Z","updated_at":"2024-11-15T22:59:54.000Z","dependencies_parsed_at":"2022-08-21T00:50:39.714Z","dependency_job_id":null,"html_url":"https://github.com/tarantool/tarantool-ruby","commit_stats":null,"previous_names":["mailru/tarantool-ruby"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ftarantool-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ftarantool-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ftarantool-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ftarantool-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarantool","download_url":"https://codeload.github.com/tarantool/tarantool-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143973,"owners_count":21054858,"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-16T04:25:39.625Z","updated_at":"2025-04-14T15:10:19.405Z","avatar_url":"https://github.com/tarantool.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tarantool16\n\nThis is adapter for [tarantool](http://tarantool.org) version 1.6 and 1.7.\n\n(adapter for version \u003c=1.5 is called [tarantool](https://github.org/tarantoool/tarantool-ruby))\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tarantool16'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tarantool16\n\n## Usage\n\nCurrently only simple single threaded one-request-at-time connection implemented.\n\n```ruby\nrequire 'tarantool16'\n\ndb = Tarantool16.new host:'localhost:33013'\n#db = Tarantool16.new host:'localhost:33013', user:'tester', password:'testpass'\n#db = Tarantool16.new host:['tcp','localhost:33013']\n#db = Tarantool16.new host:['unix','path/to.sock']\n#db = Tarantool16.new unix:'path/to.sock'\n\n# select from '_space' space info about 'test' table\n# returns array of tuples as an array\ntar.get(272, ['test'], index: 2)\n\n# same, but return tuples as a hashes\ntar.get(272, ['test'], index: 2, hash: true)\n\n# same with names\n# Names and index descriptions are fetched from tarantool.\n# Index is autodetected by key names\ntar.get(:_space, {name: 'test'})\n\n# get all spaces\ntar.select(:_space, nil, iterator: :all)\ntar.select(:_space, nil, iterator: :all, hash: true)\n\ntar.select(:_space, [512], index: 0, iterator: :\u003e=, hash: true)\n\n# override tuple field definition\ntar.define_fields(:test, [:id, :name, :value])\n\ntar.insert(:test, [1, 'buddy', [1,2,3]])\ntar.replace(:test, [1, 'buddy!', [2,3,4]])\ntar.update(:test, [1], [[':', 1, 6, 6, '?']])\n#tar.update(:test, [1], [[':', 1, 6, 6, '?']], index: 0)\ntar.delete(:test, [1])\n#tar.delete(:test, [1], index: 0)\n\ntar.insert(:test, {id: 1, name: 'buddy', value: [1,2,3]})\ntar.replace(:test, {id: 1, name: 'buddy!', value: [2,3,4]})\ntar.update(:test, {id: 1}, {name: [':', 6,6,'?']})\ntar.delete(:test, {id: 1})\n\n# note: currenlty there is no documented way to store field definition in an tarantool\n# but actually you can do it with this\ntar.update(:_space, {name: 'test'}, {format: [:=, [{name: :id, type: :num}, {name: :name, type: :str}, {name: :value, type: '*'}]]})\n\n```\n\n## Changelog\n\n0.1.0 - breaking change: call now issues request in Tarantool17 format.\n        use call16 to issue `call` request to Tarantool16.\n\tsee tests for difference in returned results.\n0.0.11 - change a way of unix socket option.\n        since previos scheme were introduced 12 hours ago,\n        i think it is still safe to change it.\n0.0.10 - a bit of fixes\n0.0.9 - Fix detection of update operation shape\n        Add unix socket connection.\n0.0.8 - Fix schema read from new tarantool versions\n        Implement UPSERT\n0.0.7 - Implement EVAL, fix REPLACE\n0.0.6 - DumbConnection supports timeouts\n\n## Contributing\n\n1. Fork it ( https://github.com/funny-falcon/tarantool16/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\nOr simply fill an issue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Ftarantool-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarantool%2Ftarantool-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Ftarantool-ruby/lists"}