All Projects → schemasafe → Troy

schemasafe / Troy

Licence: apache-2.0
Type-safe and Schema-safe Scala wrapper for Cassandra driver

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Troy

cassandra-migration
Apache Cassandra / DataStax Enterprise database migration (schema evolution) library
Stars: ✭ 51 (-66.88%)
Mutual labels:  schema, cassandra
Omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
Stars: ✭ 148 (-3.9%)
Mutual labels:  schema
Elementui
Generate a form using JSON Schema, Vue and ElementUI
Stars: ✭ 130 (-15.58%)
Mutual labels:  schema
Node Convict
Featureful configuration management library for Node.js
Stars: ✭ 1,855 (+1104.55%)
Mutual labels:  schema
Join Monster Graphql Tools Adapter
Use Join Monster to fetch your data with Apollo Server.
Stars: ✭ 130 (-15.58%)
Mutual labels:  schema
Nope Validator
A small, simple and fast JS validator. Like, wow thats fast. 🚀
Stars: ✭ 142 (-7.79%)
Mutual labels:  schema
Scobot
SCORM API for Content. JavaScript library, QUnit tests and examples.
Stars: ✭ 128 (-16.88%)
Mutual labels:  schema
Data Engineering Nanodegree
Projects done in the Data Engineering Nanodegree by Udacity.com
Stars: ✭ 151 (-1.95%)
Mutual labels:  cassandra
Spark Cassandra Connector
DataStax Spark Cassandra Connector
Stars: ✭ 1,816 (+1079.22%)
Mutual labels:  cassandra
Framework
Strongly-typed JavaScript object with support for validation and error handling.
Stars: ✭ 136 (-11.69%)
Mutual labels:  schema
Graphql Cli
📟 Command line tool for common GraphQL development workflows
Stars: ✭ 1,814 (+1077.92%)
Mutual labels:  schema
Iot Traffic Monitor
Stars: ✭ 131 (-14.94%)
Mutual labels:  cassandra
My Moments
Instagram Clone - Cloning Instagram for learning purpose
Stars: ✭ 140 (-9.09%)
Mutual labels:  cassandra
Plate
Principled schema system for JSON. Work in progress.
Stars: ✭ 130 (-15.58%)
Mutual labels:  schema
Casskop
This Kubernetes operator automates the Cassandra operations such as deploying a new rack aware cluster, adding/removing nodes, configuring the C* and JVM parameters, upgrading JVM and C* versions, and many more...
Stars: ✭ 148 (-3.9%)
Mutual labels:  cassandra
Goose
A database migration tool. Supports SQL migrations and Go functions.
Stars: ✭ 2,112 (+1271.43%)
Mutual labels:  schema
Pandasschema
A validation library for Pandas data frames using user-friendly schemas
Stars: ✭ 135 (-12.34%)
Mutual labels:  schema
Schemaspy
SchemaSpy code home
Stars: ✭ 2,027 (+1216.23%)
Mutual labels:  schema
Quill
Compile-time Language Integrated Queries for Scala
Stars: ✭ 1,998 (+1197.4%)
Mutual labels:  cassandra
Schema Typed
Schema for data modeling & validation
Stars: ✭ 150 (-2.6%)
Mutual labels:  schema

Build Status Gitter Coverage Status

Warning

Last stable code (as preseneted in ScalaExchange 2016) under "v0.5" tag.

The new approach (as presented in ScalaSwarm 2017, and Scala.World 2017) is here (in master branch), however is highly unstable at the moment. If you want something to play with, I recommend checking our POC instead.

What is Troy?

Type-safe & compile-time-checked wrapper around the Cassandra driver. That allows you to write raw CQL queries like:

@schemasafe val q = 
  query[Search, Result]("""
    SELECT x, y, z
    FROM test
    WHERE x = ? AND y = ?;
  """);

Validating them against your schema, defined as below:

@schema object Schema extends SchemaFromString(
  """     
    CREATE TABLE test (
      x text PRIMARY KEY,
      y int,
      z list<text>
    );
  """
)

and showing errors at compile-time like:

Main.scala:15: Column 'ops_typo' not found in table 'test.posts' OR Main.scala:15: Incompatible column type Int <--> troy.driver.CassandraDataType.Text

Check our examples for more usecases.

Compile-time Codec registery

Troy wraps Cassandra's codecs in Typeclasses, to allow picking the correct codec at compile-time, rather than runtime. This is also extensible, by defining an implicit HasTypeCodec[YourType, CassandraType].

Optional columns

Troy handles optional values automatically, by wrapping Cassandra's codec with null checking. All you need to do is define your classes to contain Option[T] like.

case class Post(id: UUID, title: Option[String])

CQL Syntax

Troy targets (but not fully implements) CQL v3.4.3

Status

Troy is currently is very early stage, testing, issues and contributions are very welcome.

License

This code is open source software licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].