Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

native enums #394

Closed
calvinmetcalf opened this issue Jul 24, 2014 · 13 comments
Closed

native enums #394

calvinmetcalf opened this issue Jul 24, 2014 · 13 comments

Comments

@calvinmetcalf
Copy link
Contributor

postgres has enums, we shouldn't have to manually create one with constraints

@tgriesser
Copy link
Member

This is the source I consulted with the enum stuff, the general consensus being that check constraint was preferable.

http://stackoverflow.com/questions/10923213/postgres-enum-data-type-or-check-constraint

Would be interested to hear pros/cons though

@bendrucker
Copy link
Member

Any thoughts @calvinmetcalf? This comment is the most useful: http://stackoverflow.com/a/10984951/906162

Just happened to be adding an enum to my schema (via knex) and remembered that this came up.

@gchauvet
Copy link

We use enums in an existing postgresql database without "major" issues (except in joins tables, because value is interpreted as a column). Advantages of enum against simple string check are :

  • Space occupation : only 4 bytes for enum;
  • Simplified SQL rules : enums are automatically checked.

@bendrucker
Copy link
Member

If there are good reasons to use native it seems like the ideal solution here is to add a flag so people who know what they're doing can use them. The existing behavior is the least likely to create confusion but you should certainly be able to choose to opt in.

@kentnek
Copy link

kentnek commented Nov 3, 2016

Hi, so any update on this? I'd prefer the native enums over constraints.

@carragom
Copy link
Contributor

carragom commented May 9, 2017

Reading the comments on http://stackoverflow.com/questions/10923213/postgres-enum-data-type-or-check-constraint/10984951#10984951 looks like the general consenus actually is that native enums have all the benefits and no drawbacks.

  1. They can be easily listed with a view, see here.
  2. They can be casted for extended filtering, see here.

+1 on native PostgreSQL enums.

@elhigu
Copy link
Member

elhigu commented May 9, 2017

Pretty much only drawback I can think of with enum vs. check constraint is that when you take the enum value out of DB it is jus a number and needs some mapping to have readable values on javascript side or convert enum to string before returning it from DB. Benefit is that enum takes less space.

Looks like there is not that much interest for this, since during the 3 years that this issue has been open there hasn't been that many comments / upvotes, but still if someone likes to implement option to use native enums instead of check constraints one I would consider taking that pull request in.

@jeffwillden
Copy link

jeffwillden commented Jul 15, 2017

I vote for supporting enum types. I landed here because I was trying to figure out how to create one. Disappointed to see that check constraint hacks are the answer. I agree with their benefits listed above. The "drawback" that elhigu mentioned, that the value comes out of the DB as a number, is actually a benefit if the records are sent to a client-side app. The number is obviously more compact in JSON. That can add up to big savings when sending large numbers of records that have different enumerated statuses, for example.

@elhigu
Copy link
Member

elhigu commented Jul 15, 2017

@jeffwillden If you read my last comment carefully you will notice that I actually mentioned also the benefit of enums consuming less space :)

I agree that there are times when using enums is better choice, questing is not about that. It is just a choice which way of the functionality is more commonly useful. In knex the choice was using check constraints.

Also in my personal work experience I've never came across in situation where I was wishing that my enums would be smaller in JSON (I completely understand that it is possible case and looks like you came across with one situation like that). On the other hand I've been cursing various times when I had to be working with DB that had enums stored as numbers which made interpreting raw DB data much harder.

Anyways looks like this discussion is starting to go in circles... Default functionality is not going to change, but if someone likes to implement an option { nativeEnum: true } for enum column builder I wont object.

@geekabhi
Copy link

will it be implemented for mssql as well?

@elhigu
Copy link
Member

elhigu commented Aug 31, 2017

@geekabhi should be implemented for every supported platform. However I haven't heard anyone wanting this feature so bad that they would have started implementing it.

@heisian
Copy link
Contributor

heisian commented May 12, 2018

ouch.. will definitely be using a combination of knex.raw and knex.specificType here instead of the default enum method...

@heisian
Copy link
Contributor

heisian commented May 29, 2018

awesome!

elhigu pushed a commit that referenced this issue Sep 26, 2018
* Kill queries after timeout for PostgreSQL

* Fix cancellation connection acquiring and test.

* Fix releasing connection in case query cancellation fails

* Add support for native enums on Postgres (#2632)

Reference https://www.postgresql.org/docs/current/static/sql-createtype.html

Closes #394

Signed-off-by: Will Soto <will.soto9@gmail.com>

* Removal of 'skim' (#2520)

* Allow overwriting log functions (#2625)

* Example build of custom log functions
* Handle logger object better for transactions
* Adjust test to ignore sqlite warning message

* Fixed onIn with empty values array (#2513)

* Drop support for strong-oracle (#2487)

* Remove babel-plugin-lodash (#2634)

While in theory, this may reduce the bundle size,
in practice it adds a ton of overhead during startup
due to the number of additional requires. Bundle
size also shouldn't matter for server side modules.

* Add json support to the query builder for mysql (#2635)

* Add json support to the query builder for mysql

refs #1036

Based on #1902

* Clarify supported version

* fix wrapIdentifier not being called in postgres alter column (#2612)

* fix wrapIdentifier not being called in postgres alter column

* add test for wrapIdentifier call in postgres alter column

* add comment regarding issue

* add issue & PR #'s in comment

* Remove readable-stream and safe-buffer (#2640)

* Add json support to the query builder for mysql

refs #1036

Based on #1902

* Clarify supported version

* Use native Buffer and Stream implementations

* fixes 2630 (#2642)

* Timeout errors shouldn't silently ignore the passed errors, but rather reject with original error. Fixes #2582 (#2626)

* chore: add Node.js 10 (#2594)

* chore: add Node.js 10

* chore: trigger new build

* chore: update lockfile

* chore: trigger new build

* fix: use npm i instead of npm ci

* Fix mssql driver crashing (#2637)

* Run SQL Server tests locally running SQL server in docker

* WIP mssql test stuff

* Patched MSSQL driver to not crash knex anymore

* Removed semicolon from rollback stmt for oracle (#2564)

* Remove WebSQL dialect (#2647)

* Add json support to the query builder for mysql

refs #1036

Based on #1902

* Clarify supported version

* Use native Buffer and Stream implementations

* Remove WebSQL dialect

* add homepage field to package.json (#2650)

* Make the stream catch errors in the query (#2638)

* Make the stream catch errors in the query

* Fix another case in which stream doesnt emits error

* Linter stuff

* Remove setTimeout in tests

* Make a test not to check the MySQL error code

* Fix stream error catching for MariaDB and PostgreSQL

* Fix stream error catching in Oracle

* Throw the error after emitting it to the stream

* Throw the error without instantiating a new Error

* Various fixes to mssql dialect (#2653)

* Fixed float type of mssql to be float

* Many tests where postgres test was not actually ran at all

* Migrations to be mssql compatible

Mssql driver doesn't handle if multiple queries are sent to same transaction concurrently.

* Prevented mssql failing when invalid schema builder was executed by accident

Instead of trying to generate sql from broken schema calls, just make exception to leak before query compiling is started

* Fixed mssql trx rollback to always throw an error

Also modified some connection test query to be mssql compatible

* Fixed various bugs from MSSQL driver to make tests run

* Fixed mssql unique index to be compatible with other dialect implementations

* Enable running mssql tests on CI

* Test for #2588

* Updated tests to not be dependend on tables left from previous test rans

* Trying to make mssql server work on travis

* Updated changelog and version

* Drop mariadb support  (#2681)

* Dropped support for mariasql

* ESLint

* Fixed docs to build again

* Fix knex.initialize() and adds test (#2477)

* Fix knex.initialize() and adds test

* Fix knex.initialize() and adds test

* Added test for reinitializing pool after destroy

* Fixed destroy / reinitialization test

* Fixed the fix

* Implement missing schema support for mssql dialect

* chore: Update dependencies. Remove estraverse (#2691)

* Update dependencies. Remove estraverse

* Fix compatibility with new Sinon

* Increase mssql timeout

* Normalized and validated driverNames of test db clients and fixed oracle test setup (#2692)

* Normalized and validated driverNames of test db clients and fixed oracle test setup

* Fixed failed queries from old query building tests which hadn't been ran in ages

* Allow selecting node version which is used to run oracledb docker tests

* Improved sql tester error messages

* Fixed rest of the oracledb tests

* Removed invalid flag from docker-compose

* Print mssql logs if initialization fails

* Fixed syntax error + final tests

* Added restart of failure for mssql DB initialization to try again if server was not ready

* Printout always mssql logs after container is started

* Fixed wait time printing after trying to connect

* Use npm run oracledb:test for testing oracle in travis

* Add Prettier (#2697)

* Add prettier
* Run files through prettier

* Istanbul -> NYC (#2700)

* istanbul -> nyc

* Update mocha

* Enforce code coverage (#2702)

* Enforce code coverage
* Update coverage numbers with current values

* version assignment on base class, copy on tx client, fix #2705

* Update changelog

* v0.15.1

* Added build step to test script. Fixes #2541 (#2712)

* Revert "Added build step to test script. Fixes #2541 (#2712)" (#2714)

This reverts commit 90ed8db.

* Allow oracle failures for now

* Fix issue with select(0) (#2711)

* Fix issue with select(0). Fixes #2658

* Refactor migrator (#2695)

* Refactor migrator

* Fix exports

* Fix ESLint

* Fix migrator

* Fix reference to config

* Split some more

* Fix table builder

* Fix argument order

* Merge branch 'master' of https://github.com/tgriesser/knex into feature/2690-support-multiple-migration-dirs

# Conflicts:
#	src/migrate/index.js
#	test/index.js
#	test/unit/migrate/migrator.js

* Fix #2715 (#2721)

* Fix #2715, explicitly set precision in datetime & timestamp
* Allow for precision in knex.fn.now, mysql time
* Add test for datetime with precision

* Bump changelog

* 0.15.2

* Fix issues with warnPromise when migration does not return a promise. Fixes #2725 (#2730)

* Add tests for multiple union arguments with callbacks and builders (#2749)

* Add tests for multiple union arguments

* Add some callback and raw tests to union unit tests

* Compile with before update so that bindings are put in correct order (#2733)

* Fix join using builder withSchema. (#2744)

* Use Datetime2 for MSSQL datetime + timestamp types (#2757)

* Use Datetime2 for MSSQL datetime + timestamp types

Datetime2 is now the recommended column type for new date work: https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime-transact-sql?view=sql-server-2017

* Add tests for MSSQL datetime2 changes

* General/document breaking change (#2774)

* Add changelog entry for a breaking change

* Improve entry

* Allow timestamp with timezone on mssql databases (#2724)

* Allow timestamp with timezone on mssql databases

* Change timestamp parameter to use object instead of boolean

* Update dependencies (#2772)

* Feature/2690: Multiple migration directories (#2735)

* Implement support for multiple migration directories

* Add tests for new functionality

* Fix tape tests

* Pass migration directory upwards

* Fix multiple directory support

* Fix bugs

* Rollback correctly

* Fix remaining tests

* Address comments

* #2758: Implement fail-fast logic for dialect resolution (#2776)

* Implement fail-fast logic for dialect resolution, clean-up code around.

* Remove method that was deprecated long time ago

* Address additional comments

* Try addressing comments

* Set client explicitly

* Fix compatibility with older Node versions

* Use columnize instead of wrap in using(). (#2713)

* Use columnize instead of wrap in using().

This is an attempt to fix #2136. Also added an integration test, couldn't find any existing.

* Exclude MSSQL from test as it does not support .using

* Change test to not use subquery

* Change test

* Introduced abstraction for getting migrations (#2775)

* Introduced abstraction for getting migrations

This would allow a webpack migration source which is compatible with bundling.

* Fixed migration validation with custom migration source

* Fixed issues after rebasing on muti directory PR

* Renamed parameter and fixed error message

* Addressed some PR comments

* Finished comment

* Moved filename extension filtering into fs-migrator

* Added test showing in memory custom migration source

* Cleaned up how to get config

* Fixed failing test

* Hopefully fix tests

* Fix Node.js 10 support in tests

* Test for correctly releasing cancel query connection
JakobJoonas pushed a commit to JakobJoonas/knex that referenced this issue Sep 23, 2022
rluvaton added a commit that referenced this issue Mar 2, 2024
* Build documentation for 0.17.0 (#198)

* Add documentation for migrate:down (#197)

* add missing function to sidebar (#199)

* Add notes around usage with typescript

* Generate assets

* Fix documentation for migration extension (#204)

* Improve dev workflow (#201)

* Mark generated files as binary so they don't clobber the diff

* Tweak build scripts

- Replace child-process-promise with execa which already handles SIGINT propagation & PATHEXT normalization
- Read CHANGELOG from node_modules/knex so that it works well with npm/yarn link and nodemon can pickup changes
- Tweak nodemon to auto restart when CHANGELOG changes
- Remove misleading log that rs will restart nodemon which doesn't work with spawn

* fix typo (#206)

* add intersect method (#173)

* Document transaction execution promise (#205)

* Generate documentatino for 0.18.0 (#207)

* Fix typo (#209)

Remove unnecessary parentheses

* CLI: documentation on migration:make --stub option (#208)

* Update dependencies (#210)

* Build documentation for 0.18.3 (#211)

* Add docs for seed:run --specific (#213)

* Build documentation for 0.18.4 (#215)

* Update docs for aggregation queries to include information about #3354 (#221)

Closes #219

* Document "skipLocked()" and "noWait()" (#186)

* Remove bluebird-specific methods from documentation (#222)

* Add documentation for transaction .isCompleted() (#223)

* Add extends queryBuilder documentation - related to #3334 (#218)

* Build documentation for 0.19.1 (#224)

* fix(syntax error): small issue with docs displaying invalid JS code. (#225)

* correct and clarify how to alias an identifier (#226)

* noted that aliasing uses a suffix, not a prefix
* added an example

* Fix small type (#229)

* CLI Migrations List CMD Documentation (#231)

* Support specifying schema for enums (#232)

* Release documentation for 0.19.3

* update docs as per #3416 (#233)

* Docs for disableValidateMigrationsList (#237)

* fix docs for knex.migrate.up & knex.migrate.down (#238)

* Edit table names in example to be plural (#236)

Change table names to be plural to match the style in the rest of the documentation.

* fix: repair hitchhikers guide to the galaxy update docs (#230)

* Fix broken travis badge and links after relocation of project (#240)

* replace deprecated oracle package with oracledb (#239)

* Release documentation for 0.20.0

* Documentation for #3497 (#242)

* Release documentation for 0.20.1

* Update to Babel 7, bump a couple of other dependencies

* Release documentation for 0.20.4

* Release documentation for 0.20.5

* updated transactions docs with async/await examples (#247)

* "esm module interop flag" reflects knex #3571 (#251)

* Release documentation for 0.20.10

* Release documentation for 0.20.10 - follow-up

* delete Promise.return (#256)

* Adds documentation for async knex (#259)

* Add clearGroup method documentation (#261)

* Add entry for onDistinct (#257)

* Add join to sidebar (#264)

* Change notNull to notNullable for consistency (#252)

* Release documentation for 0.20.15

* Release documentation for 0.21.0

* Add documentation about liftoff and its dependencies. Resolves #3807 (#265)

* Add docs for new migrate:unlock command (#266)

Corresponding knex PR: #3822

Co-authored-by: Zach McElrath <zach@skuid.com>

* Release documentation for 0.21.1

* remove broken link from sidebar (#269)

* pronounced /kəˈnɛks/ (#275)

* Typo fix in schema.js (#279)

* Add array of paths and sortDirsSeparately for seeds (#282)

related to #3967 and knex/documentation#220

* Release documentation for 0.21.3

* Add recursive option for seeds (#284)

Related to #3974

* Release documentation for 0.21.4

* Esm interop documentation update (#285)

* Release documentation for 0.21.5

* Typo in index.html (#291)

* add documentation for isTransaction property (#293)

closes knex/documentation#235

* docs(QueryBuilder): add method .clear(statement) (#289)

* Release documentation for 0.21.9

* Documentation for augmented table interfaces (#292)

* Initial documentation on .onConflict, .ignore, and .merge (#260)

* Release documentation for 0.21.10

* Fix spelling error (#296)

* Add documentation on "upsert" WHERE clause for PostgreSQL/Sqlite (#300)

Co-authored-by: Igor Savin <iselwin@gmail.com>

* Release documentation for 0.21.13

* Add documentation for "includeTriggerModifications" (#301)

* Release documentation for 0.21.14

* Minor tweaks on the main page

* Release documentation for 0.21.15

* var -> const
http -> https
Minor tweaks

* Add setIsolationLevel docs (#302)

Co-authored-by: Igor Savin <iselwin@gmail.com>

* Update TypeScript documentation (#303)

* Doc for analytic functions (#5)

Co-authored-by: Igor Savin <iselwin@gmail.com>

* Document optimizer hints (#306)

* Added documentation for increments primaryKey option (#308)

Co-authored-by: Igor Savin <iselwin@gmail.com>

* Added docs for new conflict merge strategies. (#307)

Co-authored-by: Matt Goodson <matt.goodson.business@gmail.com>

* fix WebpackMigrationSource example (#192) (#304)

* Add example for WebpackMigrationSource with webpack 5 (#310)

* DOCS Add constraintName option to defaultTo for mssql driver (#311)

* DOCS Add constraintName option to defaultTo for mssql driver

* Update schema.js

Co-authored-by: Igor Savin <iselwin@gmail.com>

* columnInfo: Fix bulleted list rendering (#312)

* include enlightenment about composite typing (#298)

* Add documentation for generateDdlCommands
update TOC

* Publish documentation for 0.95.0

* Fix migrate parameter (#313)

latestVersion becomes latest

* Docs for #3678: allow running multiple specific seed files (#316)

* Add documentation for "Add support for file open flags for sqlite3" (#320)

Signed-off-by: Boelensman1 <me@wiggerboelens.com>

* fixed typescript example of extending QueryBuilder (#321)

* Publish documentation for 0.95.5

* fix(docs): migration from mssql to tedious (#317)

* Fix mssql driver description

* Fix typo (#328)

* add documentation for deferrable constraint support (#330)

* Fix Sidebar element link to same section (#331)

* Publish documentation for 0.95.8

* Add documentation for partitionBy and clean up some spacings and child assigns (#333)

* Fix example for batch insert with conflict merge (#325)

* add port option to connection (#324)

* Adds a missing "the" (#318)

* Add documentation for schema nullability manipulation (#334)

* Publish documentation for 0.95.11

* feat(builder): Describe optional columnList arg to with/Recurisve [#4514] (#335)

* Add missing documentation for whereRecursive

* Adding notes about pg-native (#336)

* Add table.double to documentation (#295)

* Fix havingRaw signature (#297)

* Add dropSchema and dropSchemaIfExists doc (#4713) (#338)

* Add 'is null' support in order by documentation (#339)

* Missing comma (#340)

* Add Create table like documentation (#1373) (#341)

* Add CockroachDB (#342)

* Migrations: Fix code formatting (#343)

* View support doc (#4748) (#344)

Co-authored-by: Olivier CAVADENTI <ocavadenti@cirilgroup.com>

* Add storage engine index type doc #4756 (#345)

* Add docs for forNoKeyUpdate() and forKeyShare() (#346)

* skiplocked and nowait in mariadb (#348)

Nowait was added in 10.3 - https://mariadb.com/kb/en/wait-and-nowait/

skiplocked was added in 10.6 - https://mariadb.com/kb/en/select/#skip-locked

* feat: add builder method upsert (#349)

* Add partial index doc #4768 (#350)

* github url fix to github.com/knex/knex (#347)

* Publish documentation  for 0.95.12

* Add documentation fromRaw #4781 (#354)

* Add documentation whereLike/whereILike #4779 (#353)

* Add doc for Delete joins and using syntax in Postgres

* Add skipBinding option for offset and limit (#356)

* Add callback doc for create table like (#359)

* Update builder.js (#360)

* Remove dead link in sidebar (#361)

* Added a note about enumerations not being editable after creation (without knex.raw), as per #1699 (#314)

* Document custom seed sources (#364)

* Webpack 5 update (#365)

* remove -p parameter of webpack command

* React, Babel and more updates (#366)

* Add binary uuid doc (#368)

* docs: added some small additions about supporting `better-sqlite3` (#369)

Signed-off-by: blam <ben@blam.sh>

* Add useCamelCase doc (#358)

* Add geo columns doc (#370)

* Add alter table and fixes (#371)

* fix typo in `dropView` (#372)

* Added MSSQL unique constraint documentation (#373)

* Json Support documentation (#374)

* Multiple PKs with increments doc (#375)

* Add checks documentation (#377)

* Update returning doc (#378)

* Create or replace view doc (#376)

* add docs aout smallint, integer, biginteger, tinyint, mediumint (#363)

* href Schema.index vs column.index (#355)

* Publish documentation for 1.0.1

* Fix 1.0.1 documentation

* Update SQLite driver documentation (#381)

* Add with materialized doc (#382)

* Add onConflict raw doc (#384)

* docs: add built assets

* Add alterNullable doc (#385)

* Add alterType documentation (#387)

* Publish documentation for 1.0.2

* Publish documentation for 1.0.3

* Add whereLike functions doc (#392)

* Update CNAME

* Delete CNAME

* Create CNAME

* Publish documentation for 1.0.3\4

* Update CNAME

* Wrong doc reference for table.index (#394)

* Update Migrations doc for overrides cli (#395)

* Publish documentation for 1.0.5

* Publish documentation for 1.0.6

* Publish documentation for 1.0.7

* Update esm-interop.js (#398)

* Update doc for sqlite3 restore (#399)

* Publish documentation for 2.0.0

* Delete everything

* Migrate documentation to vitepress (#400)

Co-authored-by: Benicio Cardozo <beniciocardozomdp@gmail.com>

* feat: add deployment workflow (#404)

* Update schema-builder.md (#405)

* Update deploy.yml (#407)

* Added recommendation to set pool.min to 0 (#409)

* Fix Algolia Search Box redirecting to a 404 page (#411)

* Update transactions.md (#416)

* restore sqlite3 as the version to install for sqlite db (#418)

* docs: document primaryKey option on uuid type (#419)

* Typo (#422)

* Fix typo (#426)

* Fix a few broken links (#430)

Propably the consequence of a change in structure

* uuidToBin and binToUuid are switched (#434)

The code examples of uuidToBin and binToUuid where in the wrong order. I switched the heading and description of both so the createTable and  select statements are still correct.
I also changed 'convert a uuid (char(16))' to 'convert a string uuid (char(36))' in uuidToBin to match the description of binToUuid and the corresponding code example.
In addition I changed the specified language of the binToUuid code example from ts to js to match the language definitions of the other code examples.

* add documentation about compileSqlOnError (#436)

* Update .returning documentation to include SQLite support (#438)

This documentation update corresponds to the changes implemented in [knex/knex pull request #5285](#5285).

* add documentation for mapBinding (#440)

* docs: explicit jsonb suppor for custom pg clients (#423)

* fix a link reference (#451)

* docs: update predicate, useConstraint options in unique() (#449)

* Updated index.md (#460)

removed word 'the' before 'any' in migrations section

* fix documentation about compileSqlOnError (#463)

* raw.md typo fix (#452)

* Fix invalid bold (#461)

There was another `*` stopping a line from going bold. I fixed that.

* fix parameter order in function example (#446)

* Updating port (#470)

* Fix typo `unqiue` (#477)

* Add documentation on comment. (#450)

* Document Better-SQLite3 nativeBinding option (#504)

* Bump knex from 2.0.0 to 2.4.0 (#485)

Bumps [knex](https://github.com/knex/knex) from 2.0.0 to 2.4.0.
- [Release notes](https://github.com/knex/knex/releases)
- [Changelog](https://github.com/knex/knex/blob/master/CHANGELOG.md)
- [Commits](2.0.0...2.4.0)

---
updated-dependencies:
- dependency-name: knex
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update Changelog and fix deadlinks (#506)

* Bump vite from 2.9.9 to 2.9.15 (#448)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.9 to 2.9.15.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v2.9.15/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.15/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Typo/Grammar (#491)

Documentation grammar. `An` not required in this case--even though it precedes a vowel.

* fix doc typo (#482)

* Fix spacing typos (#467)

* Fix erroneous basic config example (#443)

Fixes the example of how to use an async function to get connection details.

The current example shows you can export an async function returning an entire [`Config`](https://github.com/knex/knex/blob/2dadde4214d9ee333adccfa517089647e94d23be/types/index.d.ts#L2698) object. However, the [type definition](https://github.com/knex/knex/blob/2dadde4214d9ee333adccfa517089647e94d23be/types/index.d.ts#L2703) shows that the `connection` property can be an async function. I can confirm that TypeScript won't compile when following the current example.

* Improve documentation for extending QueryBuilder (#462)

Changes made:
1. Changed variable where `QueryBuilder` class is located at. `Knex.QueryBuilder` is a typescript interface defined in `Knex` namespace. `QueryBuilder` class is located at `knex.QueryBuilder`.
2. Changed `QueryBuilder` interface to `QueryInterface` in custom typescript definitions. To make the custom method appear at `knex()` object, we should augment `QueryInterface`, since it's the type `Knex` interface extends.

* adds documentation about how to group and order inputs to a union (#500)

* adds documentation about how to group and order inputs to a union

* provide links to query lab for example

* docs: reference to issues in changelog (#420)

* docs: reference to issues in changelog

* reference issues in last changelogs

---------

Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>

* Update all remaining issues links in changelog (#507)

* Fix issues links (#508)

* Fix links (#509)

Co-authored-by: Garrit Franke <32395585+garritfra@users.noreply.github.com>

* Fix url esm-interop (#517)

* Document Better-SQLite3 readonly option (#505)

* Update transactions.md (#489)

* docs(pg): document QueryBuilder#updateFrom (#476)

* docs: document uuid utility function (#527)

* Update changelog for 2.5.0

(cherry picked from commit 063b380c76f6990b0c3a1470876e0781dbc98d6a)

* Fix changelog title release

* docs(pg): terminate code block in query-builder.md (#528)

* docs: provide more usage patterns for Knex configuration object (#529)

* Update changelog for 2.5.1

* Bump vite from 2.9.15 to 2.9.16 (#523)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.15 to 2.9.16.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v2.9.16/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.16/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add note regarding timestamps() for Postgres users (#475)

* fix doc typo (#474)

* Adding ability to have a custom getNewMigrationName function. (#484)

* add stream as iterator part (#454)

* Update documentation to include except keyword (#468)

* Update schema-builder.md (#432)

* Added extending docs (#414)

* docs: add TypeScript module augmentation help (#531)

* Move website deployment to root and run only on docs changes

* run format on the docs folder

* update links

* Update CONTRIBUTING.md

Co-authored-by: Igor Savin <iselwin@gmail.com>

* use npm instead of yarn

---------

Signed-off-by: Boelensman1 <me@wiggerboelens.com>
Signed-off-by: blam <ben@blam.sh>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Igor Savin <iselwin@gmail.com>
Co-authored-by: Lee Allen <leeallen337@gmail.com>
Co-authored-by: Daniel Mills <mills.dma@gmail.com>
Co-authored-by: Lorefnon <lorefnon@gmail.com>
Co-authored-by: EthanHur <ethan0311@gmail.com>
Co-authored-by: Matthew Kuo <matthewjkuo@gmail.com>
Co-authored-by: Daniel Norman <daniel@2color.me>
Co-authored-by: Vamp <25523682+the-vampiire@users.noreply.github.com>
Co-authored-by: Felix Mosheev <9304194+felixmosh@users.noreply.github.com>
Co-authored-by: Ricardo Maes <ricmzn@gmail.com>
Co-authored-by: Matthew Kuo <matthew.kuo@dialexa.com>
Co-authored-by: Joe Warner <joe.warner143@live.co.uk>
Co-authored-by: julescubtree <julescubtree@users.noreply.github.com>
Co-authored-by: Anton Sitnikov <colmer@yandex.ru>
Co-authored-by: Vithalreddy.M.B <vmreddyvmb@gmail.com>
Co-authored-by: Taras Ozarko <ivanovych666@gmail.com>
Co-authored-by: Nekrasov Ilya <nekrasov.ilya90@gmail.com>
Co-authored-by: Nima Boscarino <nima.boscarino@gmail.com>
Co-authored-by: Micheal Winger <mike.winger87@gmail.com>
Co-authored-by: maximelkin <maxelkin@list.ru>
Co-authored-by: Oran Epelbaum <oran@epelbaum.me>
Co-authored-by: Igor Savin <kibertoad@gmail.com>
Co-authored-by: Jan Swist <swistjan@gmail.com>
Co-authored-by: Mr D <daniel@australis-technica.com>
Co-authored-by: Florent Vilmart <364568+flovilmart@users.noreply.github.com>
Co-authored-by: Edvaldo Szymonek <edvaldoszy@gmail.com>
Co-authored-by: Jonas Gebhardt <jonas.gebhardt@gmail.com>
Co-authored-by: Niek <ngnijland@gmail.com>
Co-authored-by: Matthew Leffler <mattleff@gmail.com>
Co-authored-by: Zach McElrath <zach@skuidify.com>
Co-authored-by: Zach McElrath <zach@skuid.com>
Co-authored-by: Danial Malik <danialmalik321@gmail.com>
Co-authored-by: Rico Kahler <ricokahler@me.com>
Co-authored-by: Eli Geller <elitree@gmail.com>
Co-authored-by: Mathieu DARTIGUES <mathieu@dartic.fr>
Co-authored-by: Ludovic HOCHET <lhochet@gmail.com>
Co-authored-by: Tizian Adam <tizian.adam@mailbox.org>
Co-authored-by: Ivan Zhuravlev <intech@users.noreply.github.com>
Co-authored-by: Arturs Vonda <github@artursvonda.lv>
Co-authored-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Jess Martin <jessmartin@gmail.com>
Co-authored-by: Mark Boyd <markdavidboyd@gmail.com>
Co-authored-by: Kkmatt11 <kaleb.matthews@withone.vision>
Co-authored-by: Ben Lu <ayroblu@gmail.com>
Co-authored-by: CorvusCorrax <renaud.cayol@gmail.com>
Co-authored-by: martinmacko47 <martinmacko47@users.noreply.github.com>
Co-authored-by: George Petrov <george@dmxzone.com>
Co-authored-by: Matt <mpgoodson1@gmail.com>
Co-authored-by: Matt Goodson <matt.goodson.business@gmail.com>
Co-authored-by: Joshua Weiss <jtw@joshuatweiss.com>
Co-authored-by: Daniel Ferenc Balogh <danielferencortel@gmail.com>
Co-authored-by: Daniel Hensby <dhensby@users.noreply.github.com>
Co-authored-by: Jeremy W. Sherman <jeremyw.sherman@gmail.com>
Co-authored-by: Isaac Batista <isaacbatst@gmail.com>
Co-authored-by: Jérémy Lal <kapouer@melix.org>
Co-authored-by: Benedict Tesha <benedict.tesha@jamaatech.com>
Co-authored-by: Wigger Boelens <me@wiggerboelens.com>
Co-authored-by: Jonathan <barroudjo@gmail.com>
Co-authored-by: Huseyin ELMAS <hsynlms47@gmail.com>
Co-authored-by: Bruno P. Kinoshita <kinow@users.noreply.github.com>
Co-authored-by: zeotuan <48720253+zeotuan@users.noreply.github.com>
Co-authored-by: wolfcomp <magnus1997.MHO@gmail.com>
Co-authored-by: Mathias Lundell <luddd3@users.noreply.github.com>
Co-authored-by: Ahacad <51874356+Ahacad@users.noreply.github.com>
Co-authored-by: Alan Andrade <alan.andradec@gmail.com>
Co-authored-by: Matt Machuga <machuga@users.noreply.github.com>
Co-authored-by: Dustin Wheeler <mdwheele@gmail.com>
Co-authored-by: Orhan Toy <toyorhan@gmail.com>
Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
Co-authored-by: Flleeppyy <18307183+flleeppyy@users.noreply.github.com>
Co-authored-by: Adam Burgess <adamburgess@users.noreply.github.com>
Co-authored-by: Olivier CAVADENTI <ocavadenti@cirilgroup.com>
Co-authored-by: Dominik Krejcik <dominik.krejcik@gmail.com>
Co-authored-by: Daniel Black <daniel@mariadb.org>
Co-authored-by: Jiří Hofman <jiri.hofman@gmail.com>
Co-authored-by: Seth Holladay <me@seth-holladay.com>
Co-authored-by: Jeremy Walker <machineghost@gmail.com>
Co-authored-by: Ben Lambert <blam@spotify.com>
Co-authored-by: Shane A. Stillwell <shane@northernv.com>
Co-authored-by: Marat Levit <mlevit@gmail.com>
Co-authored-by: Manda Putra <mandaputra8@gmail.com>
Co-authored-by: Richard <github@naddiseo.ca>
Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
Co-authored-by: Alex Pavlovich <alexpimt1917@gmail.com>
Co-authored-by: Owen Allen <owenallenaz@gmail.com>
Co-authored-by: Sacha STAFYNIAK <sacha.stafyniak@gmail.com>
Co-authored-by: Benicio Cardozo <beniciocardozomdp@gmail.com>
Co-authored-by: Peiman Nourani <nourani.peiman@gmail.com>
Co-authored-by: Andres Kalle <mjomble@gmail.com>
Co-authored-by: 찰스 <osairis100@gmail.com>
Co-authored-by: Lucas Bickel <116588+hairmare@users.noreply.github.com>
Co-authored-by: Felix Wehnert <flashspys@gmail.com>
Co-authored-by: Phạm Thành Trung <adamward459@gmail.com>
Co-authored-by: Bruno Enten <bruno@enten.me>
Co-authored-by: Tobias Jäger <Tobias.Jaeger@slidetex.de>
Co-authored-by: Jakob Joonas <97440054+JakobJoonas@users.noreply.github.com>
Co-authored-by: Simon Plenderleith <simon@simonplend.co.uk>
Co-authored-by: Kelly Bourg <75750051+kellyrbourg@users.noreply.github.com>
Co-authored-by: Hasnae <viqueen@users.noreply.github.com>
Co-authored-by: Woosik Kim <iam.woosik.kim@gmail.com>
Co-authored-by: abal <github@abal.moe>
Co-authored-by: Tejas Dhamecha <90629399+notanmay@users.noreply.github.com>
Co-authored-by: Arthur Tabatchnic <arthur.tabatchnic+github@gmail.com>
Co-authored-by: TheUntraceable <73362400+TheUntraceable@users.noreply.github.com>
Co-authored-by: Maurice Doepke <mauricedoepke@outlook.de>
Co-authored-by: Keyu Ubi <65344874+Keyukemi@users.noreply.github.com>
Co-authored-by: Tom <1955774+tdelmas@users.noreply.github.com>
Co-authored-by: François de Metz <francois@2metz.fr>
Co-authored-by: Erin Dees <undees@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: duckboy81 <duckboy81@users.noreply.github.com>
Co-authored-by: Arpit Pandey <arpit.pandey05@gmail.com>
Co-authored-by: will ye <williamyeny@gmail.com>
Co-authored-by: Craig Blackburn <craig.r.blackburn@gmail.com>
Co-authored-by: aiven715 <44402489+aiven715@users.noreply.github.com>
Co-authored-by: Justin Schoen <j23schoen@gmail.com>
Co-authored-by: Mohamed Emad <73320969+Hulxv@users.noreply.github.com>
Co-authored-by: Benjamin Chodoroff <ben@falafelcopter.com>
Co-authored-by: Garrit Franke <32395585+garritfra@users.noreply.github.com>
Co-authored-by: Alpha Vylly <65187737+AlphaLawless@users.noreply.github.com>
Co-authored-by: Erin Dees <edees@briza.com>
Co-authored-by: Omar Abdelkader <omikader@gmail.com>
Co-authored-by: Warren Seymour <warren@fountainhead.tech>
Co-authored-by: André Ricardo <arbezerra@gmail.com>
Co-authored-by: Liran Tal <liran.tal@gmail.com>
Co-authored-by: Ashot Nazaryan <contact@hego.co>
Co-authored-by: Aleix Morgadas <hello@aleixmorgadas.dev>
Co-authored-by: Salvatore Garbesi <sal@dolox.com>
Co-authored-by: Kévin Berthommier <bertho-zero@users.noreply.github.com>
Co-authored-by: Deirdre Sweeney <dvsweeney9@gmail.com>
Co-authored-by: StefanAvra <stefan.avra@gmail.com>
Co-authored-by: Dominic Vonk <info@dovocode.com>
Co-authored-by: Calvin <clavin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants