Kevin Dodge
4b6a8045eb
Fix raw bindings typing ( #5401 )
2023-07-19 23:02:56 +02:00
Ricardo Costa
a37f4f1fb8
Improve linting ( #5460 )
...
Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
2023-07-12 22:42:57 +02:00
André Ricardo
440fe50a1e
Add uuid helper function ( #5617 )
2023-07-08 14:54:15 +02:00
Warren Seymour
61ee5338b3
feat(pg): implement QueryBuilder#updateFrom ( #5386 )
2023-07-06 13:31:28 +02:00
Bruno Moreira
89cebb0e04
Fix typing for toSql ( #5593 ) ( #5594 )
2023-07-04 20:14:37 +02:00
Jesper Engberg
c8da0dfc13
fix: add ResolveTableType for .merge()
( #5605 )
2023-07-04 12:43:06 +02:00
florian-lackner365
d9f333313b
add collate to the columnbuilder interface ( #5568 )
2023-06-28 23:46:31 +02:00
Erin Dees
dab051b6da
Add readonly option to Better-SQLite3 ( #5530 )
...
Co-authored-by: Adam Haglund <ahaglund@paypal.com>
2023-06-25 21:30:11 +02:00
Matt Meyers
b6d04f75b3
Add object syntax overload to decrement method ( #5555 )
2023-04-21 09:19:44 +02:00
François de Metz
704d12e9ba
Add ability to prepend query comments ( #5289 )
...
Co-authored-by: Ryan Fink <ryanjfink@gmail.com>
2023-04-14 06:07:05 +02:00
Muhammad Syaifudin
7f0a9fe8ed
add fetchAsString option ( #5484 )
2023-03-31 09:54:10 +02:00
David Tanner
2ad7719923
TableBuilder methods typically return the SchemaBuilder, so updating methods to reflect that. ( #5486 )
2023-03-29 14:04:57 +02:00
Deirdre Sweeney
4d5ae61bfe
[ISSUE-5350] Create EXCEPT as a valid keyword ( #5357 )
2023-03-29 14:03:59 +02:00
Omar Abdelkader
570a7eae48
Add readonly transaction access mode ( #5445 )
2023-03-29 13:59:05 +02:00
Pierre Ducher
7dd56826b9
[TypeScript ]Add missing types for havingNull and havingNotNull ( #5529 )
2023-03-29 12:50:32 +02:00
Adam Haglund
ac59ab7bb6
Add nativeBindings
option to better-sqlite3
options ( #5461 )
2023-03-28 22:12:05 +02:00
Luca Kiebel
c374a30f53
[TypeScript] Add Object syntax overload to increment method ( #5512 )
...
The [documentation for `QueryBuilder#icrements`](https://knexjs.org/guide/query-builder.html#increment ) says, that the method accepts columns and values either as separate arguments, or in Object syntax ([the code also checks if the column is an object](0d27bcb60b/lib/query/querybuilder.js (L1111)
)).
But currently this code:
````typescript
knex("table")
.where({ id: 1 })
.increment({
foo: 1,
bar: 2,
});
````
Throws an error:
````
No overload matches this call.
Overload 1 of 2, '(columnName: string | number | symbol, amount?: number): QueryBuilder<any, number>', gave the following error.
Argument of type '{ views: number; clicks: number; sales: number; }' is not assignable to parameter of type 'string | number | symbol'.
Overload 2 of 2, '(columnName: string, amount?: number): QueryBuilder<any, number>', gave the following error.
Argument of type '{ views: number; clicks: number; sales: number; }' is not assignable to parameter of type 'string'.
````
This adds an overload to the increment method type definition for the case where the first argument is an Object consisting of keys from TRecord and numbers as values.
2023-03-28 14:43:21 +02:00
Sam Adams
d39051f4a5
fix: add missing type for 'expirationChecker' on PgConnectionConfig ( #5334 )
...
Co-authored-by: Igor Savin <iselwin@gmail.com>
2022-09-28 00:25:12 +03:00
Jakob Joonas
f7ccde80c9
Make compiling SQL in error message optional ( #5282 )
2022-09-23 09:39:15 +02:00
abal
864530cd67
feat: support partial unique indexes ( #5316 )
2022-09-02 00:18:05 +03:00
Hasnae
97fccdff7d
Explicit jsonb support for custom pg clients ( #5201 )
...
Co-authored-by: Igor Savin <iselwin@gmail.com>
2022-08-31 22:16:17 +03:00
Kelly Bourg
e0c0fa9358
Implement mapBinding mssql dialect option ( #5292 )
2022-08-31 21:25:25 +03:00
mrichards42
57692d38bc
Infer specific column value type in aggregations ( #5297 )
...
The first overload of TypePreservingAggregation (taking columnName and
options) used `Readonly<TKey>` for the columnName type. In this context,
`TKey` is supposed to be a single column name, but `Readonly<TKey>` maps
over the full constraint of `ResolveTableType<TRecord>`.
This results in `TKey` being a union of all keys in the table, rather
than a single key. Because of this, the result type ends up being a
union of all values in the table.
The fix is to remove the `Readonly` type, which is fine since `TKey` is
a string and not an object like in the other overloads.
2022-08-28 21:45:04 +02:00
Patrick Wu
579ab4b885
Fix AnalyticFunction type ( #5304 )
...
affecting rowNumber, rank and DenseRank
2022-08-28 21:26:20 +02:00
Mingo Zhuang
4ab040300b
types: fix WhereJsonObject withCompositeTableType ( #5306 )
...
Issue: https://github.com/knex/knex/issues/5305
2022-08-28 21:19:35 +02:00
Elan Ruusamäe
133478874a
types: fix knex typo ( #5267 )
2022-07-30 20:40:38 +03:00
Nathan Shively-Sanders
658cde3ba2
Update types for TS 4.8 ( #5279 )
2022-07-30 20:39:15 +03:00
Delgermurun
a0c6947f60
Updating raw query bind parameter type ( #5208 )
...
Allowing custom object type in bind parameter for raw query.
2022-06-20 21:00:48 +02:00
Dominic Vonk
f80ec1cfc5
Added promisable and better types ( #5222 )
2022-06-14 13:10:01 +02:00
Lucas Bickel
0918bf9bde
fix(postgresql): add primaryKey option for uuid ( #5212 )
2022-06-08 11:41:43 +03:00
Joel Venable
d671288b09
Update type definitions for pg connection ( #5139 )
...
Co-authored-by: Igor Savin <iselwin@gmail.com>
2022-05-22 15:55:58 +03:00
Dominic Vonk
a4df3e3540
Implement extendable builders ( #5041 )
...
Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
2022-05-17 13:07:26 +03:00
Dmitry Kudryavtsev
e2516cd058
Refresh materialized view concurrently for PostgreSQL ( #5166 )
2022-05-08 20:15:43 +02:00
Richard
0e81a65f4d
Allow null
as a valid value for .enu
/.enum
( #5116 )
...
When using the `useNative` and `existingType` options, the value isn't utilized.
The documentation uses `null` as an example, this commit allows said example
to pass in typescript
close #5114
2022-04-19 11:06:01 +02:00
Wesley Wigham
359b29c000
Update knex types for TS 4.7 ( #5095 )
2022-04-04 13:03:19 +03:00
James Ide
35e1963f65
[types] Make Knex's default generic parameter types be assignable to knex's ( #5021 )
2022-03-19 13:38:56 +02:00
tharrison4815
70e5aba9a1
createTableLike callback should be optional ( #5055 )
...
Co-authored-by: Tom Harrison <tharrison@dunelm.com>
2022-03-11 10:23:41 +02:00
Olivier Cavadenti
106a881e20
Add whereLike functions ( #5044 )
2022-03-01 20:19:35 +01:00
Santi Albo
52b35de1b9
Fix types for "returning" methods ( #5031 )
2022-02-21 17:23:00 +02:00
Aaron Greene
71fd863664
Fix type definition for getMigration in MigrationSource ( #4998 )
2022-02-03 19:30:32 +01:00
Rafael Almeida
a31129be79
Fix argument type of alter
method ( #4996 )
2022-02-02 09:18:49 +01:00
gzq
f50554b4c4
feat: add order and type for uuidtobin and binToUuid ( #4969 )
2022-01-28 18:34:38 +01:00
Olivier Cavadenti
2e1016e662
Add alterType and update index.d.ts for alter function ( #4967 )
...
Co-authored-by: intech <ru31337@gmail.com>
2022-01-27 13:34:23 +01:00
Olivier Cavadenti
6ee3f94d1a
Add raw support in onConflict clause ( #4960 )
2022-01-22 14:31:51 +01:00
Olivier Cavadenti
63980987a6
Support of MATERIALIZED and NOT MATERIALIZED with WITH/CTE ( #4940 )
2022-01-20 22:54:03 +01:00
KarolBialyKainos
22f9544356
WhereILike - Fix typo in types ( #4941 )
2022-01-19 09:10:06 +01:00
Igor Savin
622b751915
Fix TS type incompatible with TS 4.6 ( #4933 )
2022-01-14 22:34:27 +02:00
Olivier Cavadenti
4494113187
Checks Constraints Support ( #4874 )
...
Co-authored-by: Ivan Zhuravlev <intech@users.noreply.github.com>
2022-01-06 14:44:16 +01:00
Olivier Cavadenti
8835d22652
Json advanced support ( #4859 )
2021-12-22 10:47:16 +01:00
Nicola Krumschmidt
157e27d0e3
Fix SQLite foreign key constraints when altering a table ( #4189 )
2021-12-13 19:59:01 +01:00