Skip to content

BreimerR/Rebo

Repository files navigation

Rebo

Rebo is a database writer.

Versions

current = :1.0.1531-SNAPSHOT

Version Naming

[1] = rebo main release
[2] = rebo bug fixes
[1531] = kotlin version i.e 1.5.31

Buy Me A Coffee

End Goal

Have a CrossPlatform database

Options

  1. Kodein-DB (Future)
  2. Exposed Currently Supported (JVM Only)

By extension making Rebo currently JvmOnly

But looking for true multiplatform solutions with native.

Dependencies

BuildSrc // Easy to use gradle scripts

Bulding Do the same for the other local dependencies strings and collection extensions

https://github.com/BreimerR/lazy
https://github.com/BreimerR/languages.git
https://github.com/BreimerR/strings
https://github.com/BreimerR/BuildSrc.git

Clone and build above repos
Post repos to mavenLocal using build publishMavenLocal / run publishMavenLocal from your IDE

Maven Posting

Maven Postings haven't been done yet But will be in the next release.

Features

  1. Generate
    1. Exposed Tables
    2. Exposed Daos
    3. Data class extension functions
  2. Generate database migration Base code
    1. Generate For Exposed database
    2. ...

Adding to your project

  1. Clone repo
git clone https://github.com/BreimerR/Rebo.git 
  1. Build repo and publish to maven local
cd Rebo
build publishMavenLocal
  1. Add mavenLocal to your repositories
repositories {
    // ...
    mavenLocal()
}
  1. Add dependencies to your project
dependencies{
   add("kspJvm","libetal.kotlinx.ksp.plugins:rebo:1.0.1531-SNAPSHOT")
}

Usage

Simple Entity Class

@Entity
data class User(
    @Column
    val name: String,
    @Column
    @PrimaryKey
    val id: Int = 0
)

With Foreign Key Table

@Entity
data class Account(
    @Column
    @ForeignKey
    val user: User,
    @Column
    @PrimaryKey
    val id: Int = 0
)

With Annotated Foreign Key

This will work the same way. Would lack some arguments used in @ForeignKey though

@Entity
data class Account(
    @Column
    val user: User,
    @Column
    @PrimaryKey
    val id: Int = 0
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages