{"id":13508786,"url":"https://github.com/cafebazaar/ecto-cassandra","last_synced_at":"2025-05-08T21:16:50.036Z","repository":{"id":57492869,"uuid":"73061963","full_name":"cafebazaar/ecto-cassandra","owner":"cafebazaar","description":"Cassandra Ecto Adapter","archived":false,"fork":false,"pushed_at":"2018-11-03T16:56:31.000Z","size":284,"stargazers_count":86,"open_issues_count":4,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-08T21:16:45.433Z","etag":null,"topics":["cassandra","cassandra-adapter","ecto"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cafebazaar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-07T09:22:59.000Z","updated_at":"2025-04-17T06:00:09.000Z","dependencies_parsed_at":"2022-08-28T11:50:46.906Z","dependency_job_id":null,"html_url":"https://github.com/cafebazaar/ecto-cassandra","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/cafebazaar%2Fecto-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafebazaar%2Fecto-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafebazaar%2Fecto-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafebazaar%2Fecto-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cafebazaar","download_url":"https://codeload.github.com/cafebazaar/ecto-cassandra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149621,"owners_count":21861740,"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":["cassandra","cassandra-adapter","ecto"],"created_at":"2024-08-01T02:00:58.416Z","updated_at":"2025-05-08T21:16:50.008Z","avatar_url":"https://github.com/cafebazaar.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"# EctoCassandra\n\n[![Build Status](https://travis-ci.org/cafebazaar/ecto-cassandra.svg?branch=master)](https://travis-ci.org/cafebazaar/ecto-cassandra)\n[![Hex.pm](https://img.shields.io/hexpm/v/ecto_cassandra.svg?maxAge=2592000)](https://hex.pm/packages/ecto_cassandra)\n[![Hex.pm](https://img.shields.io/hexpm/l/ecto_cassandra.svg?maxAge=2592000)](https://github.com/cafebazaar/ecto-cassandra/blob/master/LICENSE.md)\n[![Coverage Status](https://coveralls.io/repos/github/cafebazaar/ecto-cassandra/badge.svg?branch=master)](https://coveralls.io/github/cafebazaar/ecto-cassandra?branch=master)\n\nCassandra Adapter for [Ecto](https://github.com/elixir-ecto/ecto) (the language integrated query for Elixir)\n\n## Example\n\n```elixir\n# In your config/config.exs file\nconfig :my_app, ecto_repos: [Sample.Repo]\n\nconfig :my_app, Sample.Repo,\n  adapter: EctoCassandra.Adapter,\n  keyspace: \"ecto_simple\",\n  contact_points: [\"localhost\"],\n  replication: [\n    class: \"SimpleStrategy\",\n    replication_factor: 1,\n  ]\n\n# In your application code\ndefmodule Sample.Repo.Migrations.CreateUser do\n  use Ecto.Migration\n\n  def change do\n    create table(:users, primary_key: false) do\n      add :id, :id, partition_key: true\n      add :age, :integer, clustering_column: true\n      add :name, :string\n      add :email, :string\n      add :password_hash, :string\n\n      timestamps()\n    end\n  end\nend\n\ndefmodule Sample.Repo do\n  use Ecto.Repo, otp_app: :my_app\nend\n\ndefmodule Sample.User do\n  use Ecto.Schema\n\n  @primary_key false\n  schema \"users\" do\n    field :username, primary_key: true\n    field :age, :integer\n    field :name # Defaults to type :string\n    field :email\n    field :password_hash\n    field :password, :string, virtual: true\n  end\nend\n\ndefmodule Sample.App do\n  import Ecto.Query\n  alias Sample.{Repo, User}\n\n  def keyword_query do\n    Repo.all from u in User,\n      where: u.username == \"john\",\n      select: u.email\n  end\n\n  def pipe_query do\n    User\n    |\u003e where([u], u.age \u003e 10)\n    |\u003e order_by(:age)\n    |\u003e limit(10)\n    |\u003e Repo.all\n  end\n\n  def get_by_name do\n    Repo.get_by(username: \"john\")\n  end\nend\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafebazaar%2Fecto-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcafebazaar%2Fecto-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafebazaar%2Fecto-cassandra/lists"}