GithubHelp home page GithubHelp logo

isabella232 / kotlin-datastore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khan/kotlin-datastore

0.0 0.0 0.0 296 KB

high-level kotlin library for accessing Google cloud datastore

License: MIT License

Python 2.47% Java 0.71% Kotlin 96.82%

kotlin-datastore's Introduction

kotlin-datastore

A high-level library for accessing Google cloud datastore from kotlin / jvm.

Datastore models are represented as plain data classes. Datastore access goes through a global singleton object DB. The general design is heavily influenced by the python db and ndb datastore client libraries.

Work-in-progress library documentation

This project is organized into two subprojects (which are packaged into independent artifacts):

  1. schema-metadata This contains annotations and types for defining datastore models as kotlin data classes. Everything in here is independent of the Google cloud client libraries and could be used for expressing schemas for other databases as well.

  2. google-cloud-datastore Code for using data classes defined within the schema-metadata package as Google cloud datastore entities. Also contains a default test stub.

Status

This is currently mostly feature complete and is being used in production, but we're still numbering releases as pre-1.0 for now to allow some greater flexibility for iterating on the public API as we start to use it more.

Functionality planned prior to a first release:

  • Datastore get-by-key
  • Transactions
  • Asynchronous operation (via kotlin coroutines)
  • Datastore queries (via a Map-like interface)
  • Datastore writes
  • multi-get and -put
  • Use of plain kotlin data classes to represent datstore models
  • Reflective implementation of converting Google datastore client Entitys to data class instances
  • Reflective implementation of converting data class instances to Google datastore client Entitys
  • Annotations for assigning a different in-datastore name to a property
  • Annotations for choosing whether to index a property
  • Primitive, nonrepeated properties
  • Repeated properties
  • Nested entity properties
  • Timestamp properties
  • Key properties
  • Location properties
  • Json properties
  • Computed properties
  • Other miscellaneous property types (in general we plan to support equivalents of the standard ndb property types at https://cloud.google.com/appengine/docs/standard/python/ndb/entity-property-reference#properties_and_value_types)
  • Backend using the google-cloud-java datastore client
  • Test stub backend

Functionality planned after a first release:

  • Independent transaction propagation mode
  • Nontransactional context to escape from an ongoing transaction
  • Annotation-processor-based generation of nonreflective converters to/from Entity
  • Annotation-processor-based typed query builders
  • Generation of bigquery schemas from model data classes

License

MIT, see LICENSE file.

kotlin-datastore's People

Contributors

samuelrey avatar corajr avatar lizfaubell avatar csilvers avatar benjaminjkraft avatar cjfuller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.