TypeScript clients for databases that prevent SQL Injection
MIT License
Bot releases are hidden (Show)
Published by ForbesLindesay almost 2 years ago
interrogator
dependency to remove broken TypeScript definitions (#275)Published by ForbesLindesay almost 2 years ago
interrogator
dependency to remove broken TypeScript definitions (#275)Published by ForbesLindesay almost 2 years ago
interrogator
dependency to remove broken TypeScript definitions (#275)Published by ForbesLindesay almost 2 years ago
interrogator
dependency to remove broken TypeScript definitions (#275)Published by ForbesLindesay almost 2 years ago
Added SQLQuery.toSql()
method to allow you to get the SQLQuery
generated by pg-typed without executing it against the database. This can allow you to generate type safe parts of larger, more complex queries. (#268)
Added Table.conditionToSql(whereCondition)
utility to convert a type safe condition to the condition part of an SQLQuery
. This can be used to generate type safe conditions for queries that require a join or other more complex operation. (#268)
Added SQLQuery.distinct(...columnNames)
utility to allow you to request only distinct rows without indicating a required sort order. (#268)
Allowed arbitrary SQLQuery
s to be passed to the .find()
method, the .andWhere()
method and the and
/or
utilities. This lets you construct mostly type safe queries while still using some unsafe conditions written in raw SQL. (#268)
Published by ForbesLindesay almost 2 years ago
Release connections before running post commit steps (#274)
This reduces the risk of deadlocks where the post-commit step might be waiting for a connection from the pool while a connection is still being held by the transaction, even though the transaction cannot be used once the post-commit steps begin running.
Published by ForbesLindesay almost 2 years ago
isSqlQuery
utility to the default sql
export so it can be used as sql.isSqlQuery(q)
to test whether a value is an SQL query. (#268)Published by ForbesLindesay almost 2 years ago
Published by ForbesLindesay almost 2 years ago
Published by ForbesLindesay about 2 years ago
Published by ForbesLindesay about 2 years ago
Published by ForbesLindesay about 2 years ago
Published by ForbesLindesay about 2 years ago
Sort generated type declarations alphabetically (#257)
This makes the output more stable when adding & removing foreign keys
Add getIgnoreTest
utility (#256)
Given lists of tables to include and ignore, this returns a function to test if a given table should be ignored
Published by ForbesLindesay about 2 years ago
Add options to ignore tables when generating types (#254)
includeTables
- if specified, types will only be generated for the tables listedignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed in includeTables
Published by ForbesLindesay about 2 years ago
Add options to ignore tables when generating types (#254)
types.includeTables
- if specified, types will only be generated for the tables listedtypes.ignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed in types.includeTables
Published by ForbesLindesay about 2 years ago
Add options to ignore tables when generating types (#254)
includeTables
- if specified, types will only be generated for the tables listedignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed in includeTables
Published by ForbesLindesay about 2 years ago
Add options to ignore tables when generating types (#254)
types.includeTables
- if specified, types will only be generated for the tables listedtypes.ignoreTables
- if specified, types will not be generated for the tables listed, even if they are also listed in types.includeTables
Published by ForbesLindesay about 2 years ago
Published by ForbesLindesay about 2 years ago
Prioritise foreign keys over primary keys (#250)
If a key was both a foreign key and a primary key, we would incorrectly generate a branded type for it, rather than referencing the column being referenced by the foreign key.
Published by ForbesLindesay about 2 years ago
Force container to run with --platform linux/amd64
(#248)
This ensures the container works when run on otherwise unsupported platforms such as M1 MacBooks