{"id":18306399,"url":"https://github.com/xinz/ex_aliyun_ots","last_synced_at":"2025-04-09T20:08:36.610Z","repository":{"id":43150170,"uuid":"132878376","full_name":"xinz/ex_aliyun_ots","owner":"xinz","description":"Alibaba TableStore SDK for Elixir/Erlang","archived":false,"fork":false,"pushed_at":"2024-10-16T10:48:48.000Z","size":665,"stargazers_count":19,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T20:08:27.583Z","etag":null,"topics":["aliyun-ots","aliyun-tablestore-sdk","elixir","tablestore"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/xinz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-05-10T09:26:03.000Z","updated_at":"2024-12-03T02:17:13.000Z","dependencies_parsed_at":"2022-08-30T07:31:17.112Z","dependency_job_id":"e3f574a3-7aff-4ae0-8769-a28aaecdc280","html_url":"https://github.com/xinz/ex_aliyun_ots","commit_stats":{"total_commits":313,"total_committers":6,"mean_commits":"52.166666666666664","dds":"0.060702875399361034","last_synced_commit":"c02ab29346f5fcd164cef9a61245a957ac87eb92"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinz%2Fex_aliyun_ots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinz%2Fex_aliyun_ots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinz%2Fex_aliyun_ots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinz%2Fex_aliyun_ots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinz","download_url":"https://codeload.github.com/xinz/ex_aliyun_ots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103873,"owners_count":21048245,"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":["aliyun-ots","aliyun-tablestore-sdk","elixir","tablestore"],"created_at":"2024-11-05T15:39:08.309Z","updated_at":"2025-04-09T20:08:36.589Z","avatar_url":"https://github.com/xinz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExAliyunOts\n\n[![Coverage Status](https://coveralls.io/repos/github/xinz/ex_aliyun_ots/badge.svg?branch=master)](https://coveralls.io/github/xinz/ex_aliyun_ots?branch=master)\n[![Module Version](https://img.shields.io/hexpm/v/ex_aliyun_ots.svg)](https://hex.pm/packages/ex_aliyun_ots)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/ex_aliyun_ots/)\n[![Total Download](https://img.shields.io/hexpm/dt/ex_aliyun_ots.svg)](https://hex.pm/packages/ex_aliyun_ots)\n[![License](https://img.shields.io/hexpm/l/ex_aliyun_ots.svg)](https://github.com/xinz/ex_aliyun_ots/blob/master/LICENSE)\n[![Last Updated](https://img.shields.io/github/last-commit/xinz/ex_aliyun_ots.svg)](https://github.com/xinz/ex_aliyun_ots/commits/master)\n\nAliyun [TableStore](https://www.alibabacloud.com/product/table-store) SDK for Elixir/Erlang\n\n\u003e TableStore is a NoSQL database service built on Alibaba Cloud’s Apsara distributed operating system that can store and access large volumes of structured data in real time.\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:ex_aliyun_ots, \"~\u003e 0.11\"}\n  ]\nend\n```\n\n## Configuration\n\nAdd these settings below into the `config/ots.secret.exs` file.\n\n```elixir\nconfig :ex_aliyun_ots, :my_instance,\n  name: \"MyInstanceName\",\n  endpoint: \"MyInstanceEndpoint\",\n  access_key_id: \"MyAliyunRAMKeyID\",\n  access_key_secret: \"MyAliyunRAMKeySecret\",\n  pool_size: 100,\n  pool_count: 1\n\nconfig :ex_aliyun_ots,\n  instances: [:my_instance],\n  debug: false,\n  enable_tunnel: false\n```\n\n* `debug`, optional, specifies whether to enable debug logger, by default it is false, and please DO NOT use debug mode in production.\n* `enable_tunnel`, optional, specifies whether to enable tunnel functions, there will startup tunnel related supervisor and registry when enable it, by default it is false.\n* `pool_size`, optional, number of connections to maintain in each pool, involved when use `Finch` as Tesla http adapter, see `Finch` [module usage](https://hexdocs.pm/finch/Finch.html#module-usage) for details, defaults to 100.\n* `pool_count`, optional, number of pools to start, involved when use `Finch` as Tesla http adapter, see `Finch` [module usage](https://hexdocs.pm/finch/Finch.html#module-usage) for details, defaults to 1.\n\n\n## Using ExAliyunOts\n\nTo use `ExAliyunOts`, a module that calls `use ExAliyunOts` has to be defined:\n\n```elixir\ndefmodule MyApp.TableStore do\n  use ExAliyunOts, instance: :my_instance\nend\n```\n\nThis automatically defines some macros and functions in the `MyApp.TableStore` module, here are some examples:\n\n```elixir\nimport MyApp.TableStore\n\n# Create table\ncreate_table \"table\",\n  [{\"pk1\", :integer}, {\"pk2\", :string}]\n\n# Put row\nput_row \"table\",\n  [{\"pk1\", \"id1\"}],\n  [{\"attr1\", 10}, {\"attr2\", \"attr2_value\"}],\n  condition: condition(:expect_not_exist),\n  return_type: :pk\n\n# Search index\nsearch \"table\", \"index_name\",\n  search_query: [\n  query: match_query(\"age\", 28),\n  sort: [\n    field_sort(\"age\", order: :desc)\n  ]\n]\n\n# Local transaction\nstart_local_transaction \"table\", {\"partition_key\", \"partition_value\"}\n```\n\n## ExAliyunOts API\n\nThere are two ways to use ExAliyunOts:\n\n* using macros and functions from your own ExAliyunOts module, like `MyApp.TableStore`.\n* using macros and functions from the `ExAliyunOts` module.\n\nAll defined functions and macros in `ExAliyunOts` are available and referable for your own ExAliyunOts module as well, except that the given arity of functions may different, because the `instance` parameter of each invoke request is NOT needed from your own ExAliyunOts module although the `ExAliyunOts` module defines it.\n\n\n## Ecto Adapter\n\nHere is a [Tablestore adapter for Ecto](https://hex.pm/packages/ecto_tablestore) implementation as an alternative.\n\n## Supported Functions\n\n* Table Operations\n* Row Operations\n* Conditional update\n* Auto-increment function of the primary key column\n* Filter\n* Atomic counters\n* Search index\n* Local transaction\n* Tunnel service\n* Timeline mode\n\n## Supported API\n\n\n* Table\n  * CreateTable\n  * ListTable\n  * DeleteTable\n  * UpdateTable\n  * DescribeTable\n  * ComputeSplitPointsBySize\n\n* Row\n  * PutRow\n  * GetRow\n  * UpdateRow\n  * DeleteRow\n  * GetRange\n  * BatchGetRow\n  * BatchWriteRow\n\n* SearchIndex\n  * CreateSearchIndex\n  * DescribeSearchIndex\n  * DeleteSearchIndex\n  * Search\n  * ParallelScan\n\n* LocalTransaction\n  * StartLocalTransaction\n  * CommitTransaction\n  * AbortTransaction\n\n* SDK built-in\n  * IterateAllRange\n  * IterateParallelScan\n  * IterateSearch\n  * Sequence\n  * StreamParallelScan\n  * StreamRange\n  * StreamSearch\n\n* Tunnel service\n* Timeline mode\n\n## Thanks\n\nThanks very much for the help and support of the Alibaba TableStore offical support team.\n\n## References\n\nAlibaba Tablestore product official references:\n\n* [English document](https://www.alibabacloud.com/help/doc-detail/27280.htm)\n* [中文文档](https://help.aliyun.com/document_detail/27280.html)\n\n## License\n\nThis project is licensed under the MIT license. Copyright (c) 2018- Xin Zou.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinz%2Fex_aliyun_ots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinz%2Fex_aliyun_ots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinz%2Fex_aliyun_ots/lists"}