• Stars
    star
    88
  • Rank 375,465 (Top 8 %)
  • Language
    Elixir
  • License
    Other
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cassandra Ecto Adapter

EctoCassandra

Build Status Hex.pm Hex.pm Coverage Status

Cassandra Adapter for Ecto (the language integrated query for Elixir)

Example

# In your config/config.exs file
config :my_app, ecto_repos: [Sample.Repo]

config :my_app, Sample.Repo,
  adapter: EctoCassandra.Adapter,
  keyspace: "ecto_simple",
  contact_points: ["localhost"],
  replication: [
    class: "SimpleStrategy",
    replication_factor: 1,
  ]

# In your application code
defmodule Sample.Repo.Migrations.CreateUser do
  use Ecto.Migration

  def change do
    create table(:users, primary_key: false) do
      add :id, :id, partition_key: true
      add :age, :integer, clustering_column: true
      add :name, :string
      add :email, :string
      add :password_hash, :string

      timestamps()
    end
  end
end

defmodule Sample.Repo do
  use Ecto.Repo, otp_app: :my_app
end

defmodule Sample.User do
  use Ecto.Schema

  @primary_key false
  schema "users" do
    field :username, primary_key: true
    field :age, :integer
    field :name # Defaults to type :string
    field :email
    field :password_hash
    field :password, :string, virtual: true
  end
end

defmodule Sample.App do
  import Ecto.Query
  alias Sample.{Repo, User}

  def keyword_query do
    Repo.all from u in User,
      where: u.username == "john",
      select: u.email
  end

  def pipe_query do
    User
    |> where([u], u.age > 10)
    |> order_by(:age)
    |> limit(10)
    |> Repo.all
  end

  def get_by_name do
    Repo.get_by(username: "john")
  end
end

More Repositories

1

TrivialDrive

In-app Purchase Sample
Java
71
star
2

Poolakey

Android In-App Billing SDK for Cafe Bazaar App Store
Kotlin
71
star
3

blacksmith

Bare-Metal CoreOS Cluster Manager
Go
67
star
4

bundle-signer

Java
32
star
5

emroozjs

Multilingual Persian/Gregorian Calendar for Vue3
Vue
31
star
6

CafebazaarUnity

Cafebazaar In-app purchase Unity plugin
Java
24
star
7

CafeBazaarAuth

InAppLogin
Kotlin
22
star
8

async-actions

A more efficient way of handling async actions and loading/error states without code duplications in Vue.
JavaScript
20
star
9

flutter_poolakey

Dart
17
star
10

mnemosyne

Multilayer Cache Manager supporting multiple In-momery & Redis configurations
Go
16
star
11

BazaarPay

Kotlin
14
star
12

blacksmith-kubernetes

Painless baremetal Kubernetes cluster deployment using cafebazaar/blacksmith with minimum human intervention
13
star
13

react-native-poolakey

ReactNative In-App Billing SDK for Cafe Bazaar App Store
Kotlin
11
star
14

epimetheus

Epimetheus is a lightweight wrpper around Prometheus Go client and Statsd Go client which makes measuring communication, functions, background jobs, etc. easier.
Go
11
star
15

BazaarUpdater

Kotlin
7
star
16

healthz

A Status Reporter Golang Library
Go
5
star
17

hafezieh

A key:value cache interface, for now!
Go
5
star
18

charts

Cafebazaar charts repository
Nginx
4
star
19

profile_function

An easy profiling tool which collects elapsed time for functions and code blocks.
Python
4
star
20

kupak

Kubernetes Package Manager
Go
4
star
21

grafana-duration-heatmap-panel

Heatmap panel plugin for grafana
JavaScript
3
star
22

ConstantCreator

Kotlin
3
star
23

GameHub

Java
3
star
24

CafeBazaar-in-app-update

Android In-App Update SDK for Cafe Bazaar App Store
Kotlin
3
star
25

PoolakeyUnitySdk

C#
3
star
26

paks

Official kupak repository
Shell
3
star
27

CafeBazaarUnitySDK

C#
2
star
28

s3-api-scala

This repository provides API libraries for accessing Simple Storage Service (S3)
Scala
2
star
29

Hop

Gradle-based Android Sample
Java
2
star
30

bahram

Go
2
star
31

booker-resources

Go
2
star
32

unitypurchasing

Cafebazzaar payment implementation for unity purchasing
C#
2
star
33

booker-android-client

Java
1
star
34

booker-reservation

Go
1
star
35

AdContainer

Sample Android app that shows an Adad ad
Java
1
star
36

PoolakeyB4A

B4A In-App Billing SDK for Cafe Bazaar App Store
Java
1
star
37

go-redisproto

A fork of "https://github.com/secmask/go-redisproto" that increases bulk size buffer
Go
1
star
38

ReferrerSDK

Referrer SDK for Cafe Bazaar App Store
Kotlin
1
star
39

UnityIAP

A plugin for Unity to use Bazaar in-app purchase in Android
1
star
40

sentry-gateway

Go
1
star