All Versions
23
Latest Version
Avg Release Cycle
7 days
Latest Release
713 days ago

Changelog History
Page 1

  • v0.16.3 Changes

    June 12, 2020

    2020-06-12

  • v0.16.2

    March 18, 2020
  • v0.16.1

    March 11, 2020
  • v0.16.0 Changes

    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 Changes

    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 "[email protected]"}
    

    ๐Ÿฑ ๐Ÿ’” 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