Repository navigation
Releases: ismailkarsli/TypeSQL
Release list
@typesql/prisma@0.2.1
Patch Changes
-
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
Updated dependencies:
- @typesql/core@0.6.0
@typesql/postgres@0.2.1
Patch Changes
-
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
Updated dependencies:
- @typesql/core@0.6.0
npm: https://www.npmjs.com/package/@typesql/postgres/v/0.2.1
@typesql/pg@0.2.1
Patch Changes
-
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
Updated dependencies:
- @typesql/core@0.6.0
@typesql/language-server@0.0.1
Patch Changes
- New package: TypeScript 7's language server with completions for tables and columns inside
sql()strings, for Neovim, Zed and other editors without a TypeScript extension API (typesql-language-server [root]; the root defaults to the editor's workspace).
npm: https://www.npmjs.com/package/@typesql/language-server/v/0.0.1
@typesql/kysely@0.2.1
Patch Changes
-
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
Updated dependencies:
- @typesql/core@0.6.0
@typesql/drizzle@0.2.1
Patch Changes
-
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
Updated dependencies:
- @typesql/core@0.6.0
@typesql/core@0.6.0
Minor Changes
@typesql/core/editoris removed: editor completions moved to@typesql/language-server, which the VS Code extension bundles.
Patch Changes
-
SELECT … INTOinside a WITH query is rejected with PostgreSQL'sSELECT ... INTO is not allowed here(it was read as a data-modifying WITH query), and that error points at the new table's name, as in PostgreSQL. -
Lexer errors read like PostgreSQL's: an unterminated literal names where it starts (
unterminated quoted string at or near "'abc",unterminated bit string literal …), and a character no token starts with issyntax error at or near "\\". -
UPDATE … SET (a) = xwith a source that is neitherROW(…)nor a subquery is an error, as in PostgreSQL (source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression). -
A window function in the operand of
IN (SELECT …)is checked like any other (window "w" does not exist). -
SELECT … INTOwithout a table name is a syntax error, as in PostgreSQL, instead of being accepted. -
$1 BETWEEN a AND btypes the parameter asa($1 BETWEEN id AND big→number, notstring | number | bigint), as in PostgreSQL, which resolves$1 >= afirst. -
Bit strings (
B'101',X'1F') are typedbitinstead oftext, and a digit that does not belong is an error ("2" is not a valid binary digit), as in PostgreSQL. -
DECLARErejects contradictory options (ASENSITIVEwithINSENSITIVE,SCROLLwithNO SCROLL), and errors afterNO,WITH/WITHOUTand a lone sign inFETCHpoint at the token PostgreSQL names. -
Subscripts of
point,line(float8),lseg,box(point) andname("char") are typed as in PostgreSQL instead ofunknown, and aUESCAPEat the end of the statement reportsUESCAPE must be followed by a simple string literal at end of input. -
Syntax errors after a
WITHthat is not followed by(in CREATE TABLE / VIEW, afterUPDATEwithoutSETorDOwithoutNOTHINGin a MERGE action, and after anASwithout a label point at the token PostgreSQL points at. -
A call decoration the function does not take is an error, as in PostgreSQL:
*,DISTINCT,FILTERorOVERon a plain function (lower(x) FILTER (…)), a window function withoutOVER, andcount()without*. -
A parameter in a numeric-category argument (
abs($1),width_bucket($1, …)) isfloat8(number) instead ofnumeric, andto_tsvector($1)/ts_headline($1, …)take text instead of jsonb, as PostgreSQL resolves them. -
A JSON step that misses (
x -> 'nope', an index past the end, a key on an array) is SQL NULL, socoalesce(x -> 'nope', '[]')is typed[]instead of[] | null. -
Subscripts in a row on an array (
a[1][2],a[1][1:2]) apply to the array together, as in PostgreSQL: they are typed as its element, or as the array when one is a slice, instead ofunknown. -
Error messages name the
"char"andbit varyingtypes as PostgreSQL does (cannot subscript type bit varying …). -
A column of
CREATE TABLE … AS SELECT NULL AS xor of a view overSELECT NULListext, as in PostgreSQL, instead of a column that only takesnull. -
A window function inside the array of
x = ANY (ARRAY[…])is checked like any other (window "w" does not exist). -
An array slice is nullable when a bound is (
nums[n:2],nums[NULL:2]), as in PostgreSQL, and a subscript chain with a slice (nums[1][1:2]) is NULL only through a NULL array or subscript (out of range it is an empty array). -
SUBSTRINGandOVERLAYof avarbitare typedbit, as in PostgreSQL. -
Subscripting an enum (
mood[1], in a query or as an assignment target) reports PostgreSQL'scannot subscript type mood because it does not support subscripting. -
The README is shorter: install, one example and links to the docs site, which now has the details it used to repeat.
-
A sort order in an
ON CONFLICTtarget (ON CONFLICT (email DESC),NULLS FIRST) is an error, as in PostgreSQL. -
An ORDER BY / GROUP BY position written with leading zeros (
ORDER BY 01) is that position, and one past the int4 range is a non-integer constant, as in PostgreSQL. -
x IN (SELECT …)andx = ANY (SELECT …)over a subquery without columns reportsubquery has too few columns, as PostgreSQL does. -
"Trailing junk" errors quote the whole junk token (
123abc,100__000,$0_1), and invalid Unicode escapes inE'…'strings say where they are, as PostgreSQL does. -
An assignment target with
.*(SET col.* = …,INSERT INTO t (col.*)) reports PostgreSQL'srow expansion via "*" is not supported hereat the column. -
Subscripting a value of a type without subscripts (
json,text, …) is an error in any expression, and ajsonbslice is too, as in PostgreSQL; they were typedunknown. -
ORDER BY/GROUP BY/DISTINCT ONposition errors (ORDER BY position 2 is not in select list) point at the number, as in PostgreSQL. -
A national character literal
N'abc'is acharactervalue (string), as in PostgreSQL, instead ofunknown. -
SELECT DISTINCT *checks its ORDER BY too: an expression that is not in the select list (ORDER BY id + 1) is an error, as in PostgreSQL. -
A row compared with a subquery (
(a, b) = (SELECT x, y …)) is a nullable boolean and needs a subquery of the same width, as in PostgreSQL; it was rejected as a scalar subquery with more than one column. -
DDL errors name relations as PostgreSQL does: a missing schema in
ALTER TABLE,DROP TABLE,INHERITSorLIKEreportsschema "s" does not exist, a missing relation there is spelled as written (relation "public.t" does not exist),DROP/is not a tablemessages use the bare name, and two parents with different column types reportinherited column "x" has a type conflict. -
A typed literal with a schema-qualified type name,
pg_catalog.int4 '1', is accepted (the schema is dropped, as in casts) instead of being a syntax error. -
A missing relation written with
public.keeps it in the error (relation "public.t" does not exist), and errors about a schema-qualified name point at the name, as in PostgreSQL. -
INSERT INTO t AS excluded … ON CONFLICT DO UPDATE SET c = excluded.cis an error (table reference "excluded" is ambiguous), as in PostgreSQL. -
Syntax errors in
1 + ANY 2,f(1 => x),current_date()andlocaltime('a')point at the token PostgreSQL points at, andcurrent_user(1)is a syntax error, as in PostgreSQL. -
The merged column of
FULL JOIN … USING/NATURAL FULL JOINis nullable when either side's column is (a row without a match carries that side's NULL), as in PostgreSQL; it was non-null unless both were nullable. -
U&'…' uescapeé(UESCAPE followed by a non-ASCII letter) reads as an alias, as in PostgreSQL, instead of an error.
@typesql/prisma@0.2.0
Minor Changes
-
@typesql/prisma/generatorexports onlygenerateSource(with itsEmitOptionsandDmmfDatamodeltypes); the generator's protocol and handler pieces are internal. -
NoResultError,ExecutorandTransactionalSqlare no longer re-exported (from@typesql/drizzlealsoSql,Query,RowType,ParamsType,DefaultTypeMapandTypeMap); import them from@typesql/core.
Patch Changes
- Updated dependencies:
- @typesql/core@0.5.0
@typesql/postgres@0.2.0
Minor Changes
-
NoResultError,ExecutorandTransactionalSqlare no longer re-exported (from@typesql/drizzlealsoSql,Query,RowType,ParamsType,DefaultTypeMapandTypeMap); import them from@typesql/core. -
createBigIntSql(sql)is replaced bycreateSql(sql, { bigint: true }), andPostgresJsBigIntSql<DB, Keys>byPostgresJsSql<DB, Keys, PostgresJsBigIntTypeMap>.
Patch Changes
-
The README's TypeScript Playground example uses
createSql(sql, { bigint: true })instead of the removedcreateBigIntSql. -
Updated dependencies:
- @typesql/core@0.5.0
npm: https://www.npmjs.com/package/@typesql/postgres/v/0.2.0
@typesql/pg@0.2.0
Minor Changes
-
@typesql/pg/introspectno longer exportsmain,ViewNullabilityandparseNodeTree. -
NoResultError,ExecutorandTransactionalSqlare no longer re-exported (from@typesql/drizzlealsoSql,Query,RowType,ParamsType,DefaultTypeMapandTypeMap); import them from@typesql/core.
Patch Changes
-
typesql introspectno longer hangs on views that read each other (CREATE OR REPLACE VIEWallows the cycle); their columns are nullable. -
Updated dependencies:
- @typesql/core@0.5.0