All Versions
22
Latest Version
Avg Release Cycle
3 days
Latest Release
73 days ago

Changelog History
Page 1

  • v0.16.2

    March 18, 2020
  • v0.16.1

    March 11, 2020
  • v0.16.0

    March 11, 2020

    🆕 New Features

    • 👍 Multi-part form support using Pantry.
    • ➕ Added few convenience session methods - intended() and previousUrl(). These methods are also available on an HttpCall object.
    • ➕ Added a new method, inRandomOrder(), for fetching entities in random order from a MySQL database.
    • ➕ Added render() and json() methods with ArgsBuilder as a lambda receiver.
    • ➕ Added HttpCall.entityParam() extension method that fetches an entity from a table by looking up an id route param.
    • ➕ Added an API to register a custom view function as easily as adding a custom tags.
    • ➕ Added a spoof() view function. (Resolves #27).
    • ➕ Added asynchronous support using CompletableFuture.
    • ➕ Added intReference() and longReference() as shortcuts for defining referencing columns.

    👌 Improvements

    • ⚡️ Updated to Kotlin 1.3.70

    🐛 Bug Fixes

    💥 Breaking Changes

    • ⚡️ useCurrent attribute is set to false for bothcreatedAt() and updatedAt().
  • v0.15.4

    March 06, 2020
  • v0.15.3

    March 06, 2020
  • v0.15.2

    February 24, 2020
  • v0.15.1

    February 20, 2020
  • v0.15.0

    February 18, 2020

    🚀 This release brings even more exciting features and improvements to Alpas. Here are the highlights:

    🍱 🎉 New Features

    ✔️ Resourceful Routes

    You can create a resourceful routes for all the CRUD operations by using resources() method:
    resources<PostController>("posts").name("posts")

    ✔️ Auto Port Selection

    📄 In dev mode Alpas automatically selects the next port if the selected port is in use already. Docs.

    ✔️ Ozone Extensions

    ⚡️ Few useful methods and conventions are added in Ozone such as findOrCreate(attrs), findOne(attrs), findMany(), update(attrs), reference() etc. Docs.

    ✔️ Column Binding Conventions

    ⚡️ Also added are four new column bindings - createdAt(), updatedAt(), increments(), bigIncrements().
    📄 Docs.

    This means instead of this:

    val id by bigInt("id").autoIncrement().unsigned().primaryKey().bindTo{ it.id }val createdAt by timestamp("created\_at").nullable().useCurrent().bindTo { it.createdAt }val updatedAt by timestamp("updated\_at").nullable().useCurrent().bindTo { it.updatedAt }
    

    You can do this:

    val id by bigIncrements()val createdAt by createdAt()val updatedAt by updatedAt()
    

    ✔️ Routes reloading without re-running the app

    🐎 In dev mode, routes are now reloaded without restarting the app. For performance reason this is disabled in the prod mode.

    ✔️ Run migrations using a name property

    This allows to run migrations even from a fat jar. Very helpful in production.

    ✔️ Added basic table modification support

    You can now addColumn() and dropColumn()

    ✔️ Reference Constraint

    You can now add a reference constraint on a column:

    val userId by long("user\_id").belongsTo(Users) { it.user }.unsigned().reference { onDeleteCascade() }
    

    🍱 💄 Improvements

    ⚡️ 😀 Assets handling is more optimized.

    👀 😀 You can seed a database with database refresh by using --seed flag.

    🍱 😀 Improved strong typing while overriding an entity's properties in an entity factory.

    val user = from(UserFactory) { it.name to "Jane M. Doe" it.email to "differentjane@example.com"}
    

    🍱 💔 Breaking Changes

    🚀 There are few but significant breaking changes in this release:

    🤦🏽‍♂️ Entity has been renamed to OzoneEntity and MigratingTable has been renamed to OzoneTable:

    // Before: interface User : Entity\<User\>// Now:interface User : OzoneEntity\<User\> { // ...// Before: companion object : Entity.Factory\<User\>// Now:companion object : OzoneEntity.Of\<User\>() }// Before: object Users : MigratingTable\<User\>// Now:object Users : OzoneTable\<User\>("users") { // ...}
    

    🤦🏽‍♂️ EntityFactory now takes two parameters instead of one:

    // Before: class UserFactory() : EntityFactory\<User\>()// Now:class UserFactory() : EntityFactory\<User, Users\>() { // ...}
    

    🤦🏽‍♂️ Methods Renamed:

    • onlyParams() method has been renamed to params()
    • paramAsString() method is now stringParam()
    • paramAsInt() is now intParam()
    • paramAsLong() is now longParam()
    • paramAsBool() is now boolParam()
  • v0.14.3

    February 10, 2020
  • v0.14.2

    February 10, 2020