Git Product home page Git Product logo

grails-data-mapping's Introduction

Build Status

Grails Datastore API (aka GORM)

[Grails][Grails] is a framework used to build web applications with the [Groovy][Groovy] programming language. This project provides the plumbings for the GORM API both for Hibernate and for new implementations of GORM ontop of NoSQL datastores. [Grails]: http://grails.org/ [Groovy]: http://groovy.codehaus.org/

Getting Started

See the following links for documentation on the various implementations:

For API documentation see:

For other implementations see the following page.

Below is an example of using GORM for Hibernate in a Groovy script:

@Grab("org.grails:grails-datastore-gorm-hibernate4:3.0.0.RELEASE")
@Grab("org.grails:grails-spring:2.3.6")
@Grab("com.h2database:h2:1.3.164")
import grails.orm.bootstrap.*
import grails.persistence.*
import org.springframework.jdbc.datasource.DriverManagerDataSource
import org.h2.Driver
 
 
init = new HibernateDatastoreSpringInitializer(Person)
def dataSource = new DriverManagerDataSource(Driver.name, "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE", 'sa', '')
init.configureForDataSource(dataSource) 
 
 
println "Total people = " + Person.count()
 
 
@Entity
class Person {
    String name
    static constraints = {
        name blank:false
    }
}

Developing Implementations

For further information on the project see the comprehensive [developer guide][Developer Guide]. [Developer Guide]: http://projects.spring.io/grails-data-mapping/manual/index.html

License

Grails and Groovy are licensed under the terms of the [Apache License, Version 2.0][Apache License, Version 2.0]. [Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html

grails-data-mapping's People

Contributors

graemerocher avatar sarmbruster avatar lhotari avatar burtbeckwith avatar rstepanenko avatar erawat avatar jbrisbin avatar tomwidmer avatar beckje01 avatar bobbywarner avatar longwa avatar glaforge avatar bluesliverx avatar tednaleid avatar yamkazu avatar cdanielw avatar jsaardchit avatar mackd avatar candrews avatar ldaley avatar wdroste avatar noamt avatar rvanderwerf avatar paralk avatar antongnutov avatar aeischeid avatar shushkevich avatar robfletcher avatar erdi avatar jyemin avatar

Watchers

OSS Contributor 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.