Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

7/7/2017

Reading time:1 min

trebogeer/j-cql

by John Doe

README.md JCQL JCQL is a tool allowing to generate boilerplate java code from existingcassandra schema. It is intended to be used with Cassandra 2.1+ due to support of UDTs (User Defined Types)/Tuples/Collections.Cassandra's UDTs/Tuples/Collections and an ability to introspect schema through java driver make it possible to automaticallygenerate POJOs and corresponding mappers between database and java models. Properly generated java code saves development effortsand is less error-prone compared to hand coding. Accompanied with proper CI and deployment it can also guarantee consistency betweendatabase and java models at any point of application lifecycle from development to production rollout. JCQL does not rely on javareflection or annotations which means all discrepancies between actual cassandra schema and what client code expects it to be will be identifiedduring compilation not at runtime in the middle of the night right after production release. No need to worry about Cassandra client codeperformance implications due to use of reflection.Key featuresLightweight: Depends only on cassandra java driver and tiny javatuples library to support Cassandra tuples.POJO-oriented development: Maps Cassandra rows to automatically generated domain objects so you can still work with the Object Oriented aspect of Java.Easy to learn and use: JCQL is extremely simple to use. After code is generated there are only three interfaces you need to worry about to map data from POJOs to Statements and back.To try outAutomatically generated java code from sample cassandra schema (../src/main/resources/schema.cql) will become availableunder ../target/autogen/DocumentationProject Homehttp://trebogeer.github.io/j-cqlCurrent versionThe current stable version of JCQL is 0.8.7The current development version of JCQL is 0.9.0-SNAPSHOTLicenseJCQL is released under the Apache License, Version 2.0.(ツ)

Illustration Image

README.md

JCQL Build StatusMaven Central

JCQL is a tool allowing to generate boilerplate java code from existing cassandra schema. It is intended to be used with Cassandra 2.1+ due to support of UDTs (User Defined Types)/Tuples/Collections. Cassandra's UDTs/Tuples/Collections and an ability to introspect schema through java driver make it possible to automatically generate POJOs and corresponding mappers between database and java models. Properly generated java code saves development efforts and is less error-prone compared to hand coding. Accompanied with proper CI and deployment it can also guarantee consistency between database and java models at any point of application lifecycle from development to production rollout. JCQL does not rely on java reflection or annotations which means all discrepancies between actual cassandra schema and what client code expects it to be will be identified during compilation not at runtime in the middle of the night right after production release. No need to worry about Cassandra client code performance implications due to use of reflection.

Key features

  • Lightweight: Depends only on cassandra java driver and tiny javatuples library to support Cassandra tuples.

  • POJO-oriented development: Maps Cassandra rows to automatically generated domain objects so you can still work with the Object Oriented aspect of Java.

  • Easy to learn and use: JCQL is extremely simple to use. After code is generated there are only three interfaces you need to worry about to map data from POJOs to Statements and back.

To try out

Automatically generated java code from sample cassandra schema (../src/main/resources/schema.cql) will become available under ../target/autogen/

Documentation

Project Home

http://trebogeer.github.io/j-cql

Current version

The current stable version of JCQL is 0.8.7
The current development version of JCQL is 0.9.0-SNAPSHOT

License

JCQL is released under the Apache License, Version 2.0.

(ツ)

Related Articles

spring
rest
api

GitHub - DataStax-Examples/spring-data-starter: ⚡️ A sample Spring Data Cassandra REST API

John Doe

2/14/2024

cassandra
java

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

github