All Projects β†’ aselab β†’ Scala Activerecord

aselab / Scala Activerecord

Licence: mit
ActiveRecord-like ORM library for Scala

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Scala Activerecord

Jennifer.cr
Crystal ORM using ActiveRecord pattern with flexible query DSL
Stars: ✭ 309 (-4.63%)
Mutual labels:  orm, activerecord
Baby squeel
🐷 An expressive query DSL for Active Record 4 and 5
Stars: ✭ 362 (+11.73%)
Mutual labels:  orm, activerecord
Active importer
Define importers that load tabular data from spreadsheets or CSV files into any ActiveRecord-like ORM.
Stars: ✭ 333 (+2.78%)
Mutual labels:  orm, activerecord
Sqlalchemy Mixins
Active Record, Django-like queries, nested eager load and beauty __repr__ for SQLAlchemy
Stars: ✭ 441 (+36.11%)
Mutual labels:  orm, activerecord
Objectivesql
ObjectiveSQL is an ORM framework in Java based on ActiveRecord pattern, which encourages rapid development and clean, codes with the least and convention over configuration.
Stars: ✭ 1,109 (+242.28%)
Mutual labels:  orm, activerecord
Awesome Python Models
A curated list of awesome Python libraries, which implement models, schemas, serializers/deserializers, ODM's/ORM's, Active Records or similar patterns.
Stars: ✭ 124 (-61.73%)
Mutual labels:  orm, activerecord
Datamappify
Compose, decouple and manage domain logic and data persistence separately. Works particularly great for composing form objects!
Stars: ✭ 338 (+4.32%)
Mutual labels:  orm, activerecord
Openrecord
Make ORMs great again!
Stars: ✭ 474 (+46.3%)
Mutual labels:  orm, activerecord
Topaz
A simple and useful db wrapper for Crystal-lang
Stars: ✭ 56 (-82.72%)
Mutual labels:  orm, activerecord
Torm
Just another simple PHP ORM. You can use it, but don't ask me why I made it. :-)
Stars: ✭ 90 (-72.22%)
Mutual labels:  orm, activerecord
monalisa-orm
Very Simple ORM
Stars: ✭ 70 (-78.4%)
Mutual labels:  activerecord, orm
Think Orm
Think ORMβ€”β€”the PHP Database&ORM Framework
Stars: ✭ 303 (-6.48%)
Mutual labels:  orm
Sqlc
Generate type-safe code from SQL
Stars: ✭ 4,564 (+1308.64%)
Mutual labels:  orm
Shiba
Catch bad SQL queries before they cause problems in production
Stars: ✭ 277 (-14.51%)
Mutual labels:  activerecord
Java Bible
🍌 ζˆ‘ηš„ζŠ€ζœ―ζ‘˜θ¦
Stars: ✭ 2,919 (+800.93%)
Mutual labels:  orm
Html5 validators
A gem/plugin for Rails 3, Rails 4, Rails 5, and Rails 6 that enables client-side validation using ActiveModel + HTML5 Form Validation
Stars: ✭ 302 (-6.79%)
Mutual labels:  activerecord
Pluck to hash
Extend ActiveRecord pluck to return array of hashes
Stars: ✭ 275 (-15.12%)
Mutual labels:  activerecord
Database validations
Database validations for ActiveRecord
Stars: ✭ 274 (-15.43%)
Mutual labels:  activerecord
Sequelizer
A GUI Desktop App for export sequelize models from database automatically.
Stars: ✭ 273 (-15.74%)
Mutual labels:  orm
Architect
A set of tools which enhances ORMs written in Python with more features
Stars: ✭ 320 (-1.23%)
Mutual labels:  orm

Scala ActiveRecord maven central javadoc

scala-activerecord is an ORM library for Scala.

This library is inspired by ActiveRecord of Ruby on Rails. It is designed following the CoC(Convention over Configuration), DRY(Don't Repeat Yourself) principles.

Minimal example

Model implementation:

package models

import com.github.aselab.activerecord._
import com.github.aselab.activerecord.dsl._

case class Person(name: String, age: Int) extends ActiveRecord

object Person extends ActiveRecordCompanion[Person]

Schema definition:

package models

import com.github.aselab.activerecord._
import com.github.aselab.activerecord.dsl._

object Tables extends ActiveRecordTables {
  val people = table[Person]
}

ActiveRecord model usage:

import com.github.aselab.activerecord.dsl._
import models._
import scala.language.postfixOps

object App extends App {
  Tables.initialize
  
  Person("person1", 25).save()
  Person("person2", 18).save()
  Person("person3", 40).save()
  Person("person4", 18).save()

  Person.findBy("name", "person1") //=> Some(Person("person1", 25))
  Person.findBy("age", 55) //=> None
  Person.findAllBy("age", 18).toList //=> List(Person("person2", 18), Person("person4", 18))
  Person.where(_.age.~ >= 20).orderBy(_.age desc).toList //=> List(Person("person3", 40), Person("person1", 25))
  
  Tables.cleanup
}

Schema and query DSL is based on Squeryl.

Features

  • Auto connection management
  • Composable query operation
  • Callback
  • Validation
  • Association

Documents and other resources

Web framework support

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].