Skip to content

Releases: adonisjs/lucid

Solidifying Lucid with bunch of new features and bug fixes

18 Apr 10:53
Compare
Choose a tag to compare

Highlights

  • Support for query scopes with proper intellisense
  • Option to define hooks by decorating functions
  • A standard way to listen for database query events using the Event module of AdonisJS.
  • Helper function to pretty print SQL query logs
  • Support for Pagination
  • Support for Global transactions. Helpful during tests
  • Added tests to run on MSSQL too.

Commits

  • feat: allow defining hooks via decorators ae2f398
  • style: fix after rebase c9b0e24
  • improvement: use toSQL method directly, since knex has added it to their types b3f9917
  • chore: cleanup dependencies f697a38
  • style: improve log message in migrations command 2a0db32
  • improvement: raise error when trying to merge or fill extra properties to model 003f1c4
  • improvement: raise error when trying to merge or fill extra properties to model 1167b54
  • refactor: use mustache syntax for stubs ebee5fb
  • chore: update dependencies b20776a
  • feat: accept custom data to set set on query event e9f944b
  • refactor: pass model name to query reporter for updates, deletes and inserts 87f9599
  • fix: return ModelQuery builder for update and deletes 4a6f165
  • refactor: re-organize code f09f4f6
  • fix: use fromSQL method to convert sql date times to luxon instances 40d528d
  • chore: update database config template to drop Contract from config types f058141
  • refactor: depreciate "debug" config property b536acc
  • refactor: cleaning up migration commands b6dc1ce
  • refactor: nest transaction queries inside profiler row 06f361a
  • feat: add querylogs pretty printer 4281d1f
  • feat: emit db queries 1466b31
  • test: fix breaking test 297acd1
  • fix: provider to export orm config 6bddf84
  • feat: expose SimplePaginator on database object for manual construction f533fe5
  • feat(paginator): add getUrlsForRange method 8cac552
  • feat: add first and firstOrFail as static model methods 05f2422
  • refactor: drop Contract keyword from everything except implmentable interfaces b5302d5
  • refactor: extract Model.defineScope to its own helper method 5c150b8
  • feat: implement fetch and find hooks 5e125f9
  • refactor: serialize dates to ISODate string by default be8a9f8
  • chore: update .env file d07d5ca
  • feat: implement relationships onQuery hook 9b58684
  • feat: implement query scopes 88cf86b
  • refactor: huge cleanup to simplify things all around f268dea
  • WIP 6c44456
  • refactor: cleanup query builder types 0096e76
  • test: add tests for clone method 6286276
  • feat: implement standard offset,limit based pagination d3584fe
  • feat(QueryBuilder): add clearLimit and clearOffset methods 6ba940f
  • test: add tests for union queries 6293d2f
  • refactor: add connection name to the query log messages a3a494b
  • feat: add schema.raw to get an instance of knex query builder 5570d10
  • test: use client.context over client._context after recent change in knex 2686a5c
  • fix: having method signature after knex upgrade 9ba7f89
  • chore: update dependencies f13f503
  • refactor: update code to work consistently with mssql 6874d59
  • fix: add missing dev dependency mssql d338c93
  • test: update tests to work cross database servers 8fa6cce
  • refactor: fixing import case 8cd21d6
  • chore: add support for running tests on mssql server 5c35853
  • feat: add getAllTables method to get a list of all table names as an array e48709f
  • feat: extend validator by adding unique and exists rules 4768c3c
  • feat: add support for self managed transactions 0e2f6ee
  • chore: update dependencies 3398653

v7.6.3...v8.0.0

Fixing make:model command

10 Mar 05:20
Compare
Choose a tag to compare
  • fix(make model): create command inside the application source 31bcbb4

v7.6.2...v7.6.3

Add make:model command

08 Mar 15:48
Compare
Choose a tag to compare
  • refactor: raise meaningful exceptions when undefined is passed ORM query methods 6864447
  • feat(cli): add make:model command (#525) 0f4a080

v7.6.1...v7.6.2

Add support for Global transactions

06 Mar 10:17
Compare
Choose a tag to compare
  • feat: add support for global transactions 5aebc31
  • chore: update dependencies 6780b44

v7.6.0...v7.6.1

Adding `ref` and `raw` method to Database

04 Mar 16:37
Compare
Choose a tag to compare

Ref

The ref returns an instance of ReferenceBuilder, which can be used to mark string like values as database identifiers. For example:

Database.query().where('id', Database.ref('some-subquery.user_id'))

With ref, the value will be considered as string literal. But we want it to be reference to a column from a sub query select

Raw

The raw is like rawQuery method, but you cannot execute it.

  • feat: add static raw builder 17090ee
  • feat: add support for reference builder 13ebfd3
  • fix: allow subqueries inside select clause 98a2c60
  • refactor: fix typo in database config stub 429ed34

v7.5.5...v7.6.0

Remove columnify and use cli table 3

01 Mar 08:42
Compare
Choose a tag to compare

We are using cli-table3 in place of columnify, since it is used by other AdonisJS packages

  • chore: upgrade @adonisjs/core 07d67a4
  • chore: update @adonisjs/core and tweak health check report d89e2a6
  • refactor: remove columnify in favor of cli-table3 dceebb6

v7.5.4...v7.5.5

Fix formatting for some log messages

29 Feb 07:38
Compare
Choose a tag to compare
  • style: remove unwanted style from log statements 7375ae4
  • chore: update dependencies c3b915e
  • docs(readme): update badges a16306f
  • docs(readme): update description c27799a

v7.5.3...v7.5.4

Improve truncate method and rename .raw to .rawQuery

28 Feb 04:42
Compare
Choose a tag to compare
  • feat: add truncate method to base model 8bdb7d4
  • feat: add cascade support to truncate methods 5c678af
  • refactor: config stub enable debugging when log level is trace 6a22a17
  • style: remove _ from private properties 084345e
  • feat(commands): print preview message when running migrations commands 687c145
  • refactor: rename raw to rawQuery, preserving .raw for future 27184fd
  • fix(QueryClient): columnsInfo method must use knexQuery.table method 57c56b7
  • chore(package): update dependencies ccc2e46

v7.5.2...v7.5.3

Fix aggregate queries for relationships

18 Feb 14:26
Compare
Choose a tag to compare
  • fix(relations): generate correct sql queries for related aggregate queries 3ee025a

v7.5.1...v7.5.2

Remove timezone option from per column settings and handful of bug fixes

17 Feb 15:05
Compare
Choose a tag to compare
  • refactor: remove timezone configuration from individual fields fd91b32
  • feat(BaseModel): merge and fill ignore undefineds by default, with an option to disable behavior 2a4ea4b
  • fix(query builder): where clause check for undefined values when decided which arguments to use 60f2600
  • chore: update dependencies 7c68ec9

v7.5.0...v7.5.1