Skip to content
No description, website, or topics provided.
Scala Java
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project Update Plugings Jun 13, 2019
src Just refactor & remove some part to common Jul 21, 2019
.gitignore
LICENSE Apply LICENSE and Update Sonar config Sep 24, 2017
README.md Set version to the same latest release version and update READEME Aug 31, 2019
build.sbt 4.0.9 Aug 29, 2019
sonatype.sbt Remove unused dependency & Add count on generted May 12, 2018

README.md

YODA - ORM

Simple Scala case class ORM,

sbt publishM2
sbt publishSigned
sbt sonatypeRelease
sbt "sonatypeRelease innorbor-xxxx"

sbt sonatypeList
sbt sonatypeClose
sbt sonatypeDrop

BTW, This project is completely opensource and feel free to PR

Compare: PreparedStatement and PStatement

    val preparedStatement = conn.prepareStatement(FIND)
    preparedStatement.setLong(1, id)
    preparedStatement.setString(2, status)
    preparedStatement.setDateTime(3, yesterday)
    
    val rs = preparedStatement.executeQuery()

    val (id1, status1, yesterday1) = (rs.getLong(1)
        , rs.getString(2)
        , rs.getTimeStamp(3))
    FIND : SELECT * FROM people where id = 1s
    
    val result = PStatement(FIND)
      .setLong(id)
      .setString(status)
      .setDateTime(yesterday)
      .queryOne(rs => (rs.getLong(1)
        , rs.getString(2)
        , rs.getDateTime(3)
      ) 

    case class People(id: Long, name: String, born: DateTime)
    
    val people = PStatement(FIND)
      .setLong(id)
      .queryOne[People]
      
    val peoples = PStatement(FIND)
      .setLong(id)
      .queryList[People]
      
    
    import in.norbor.yoda.orm.JavaSqlImprovement
      
    val peoples = PStatement(FIND)
      .setLong(id)
      .queryOne( (rs) => People(id = rs.getLong("id")
        , name = rs.getLong("name")
        , boar = rs.getDateTime("born")
      )
      
    val peoples = PStatement(FIND)
      .setLong(id)
      .queryList( (rs) => People(id = rs.getLong("id")
        , name = rs.getLong("name")
        , boar = rs.getDateTime("born")
      )
    val g = Generator()
    implicit val target: String = "target"

    g.gen[Customer](table = "customer", idName = "id", idType = "String")

For fully documents, Please looking from /src/test/scala

@ COPYRIGHT IN.NORBOR, 2018

You can’t perform that action at this time.