TypeScript clients for databases that prevent SQL Injection
MIT License
Bot releases are hidden (Show)
Published by ForbesLindesay over 2 years ago
Published by ForbesLindesay over 2 years ago
Added types.tableReExportFileName
(#211)
This re-exports the table record type from index.ts
by default as a convenience. You can explicitly set it to null
to disable this behaviour.
Added types.tableInsertParametersReExportFileName
(#211)
This re-exports the table insert type from index.ts
by default as a convenience. You can explicitly set it to null
to disable this behaviour.
Added types.schemaJsonFileName
, with a default of "schema.json"
(#211)
These help to support pg-typed's usage of pg-bulk. You should use this generated object instead of serializeValue
in most places. If you don't want to generate this file, you can set schemaJsonFileName
to null
to disable it.
Published by ForbesLindesay over 2 years ago
Add utility for re-exporting a value or type declared in another file. (#211)
Add writeFile
method to PrintContext
to enable writing non-TypeScript files (e.g. .json
files) (#212)
Published by ForbesLindesay almost 3 years ago
Print correct instructions for enabling debug logs (#209)
Wait for the database and user to be created before resolving (#209)
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Add testConnection
option as alternative to just waiting for the container to listen on a port (#209)
Add enableDebugInstructions
to allow providing instructions for enabling debug logs (#209)
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Update the default image for tests to mysql:8.0.23
(#206)
You will now get version 8.0.23 by default. If you want to maintain the old behaviour, you have 3 options:
You can specify:
{
"test": {
"image": "mysql:5.7.24"
}
}
in your mysql config
Set the MYSQL_TEST_IMAGE
environment variable to mysql:5.7.24
If you are using mysql-test as a CLI, you can pass:
--image mysql:5.7.24
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
Published by ForbesLindesay almost 3 years ago
@databases/mysql-config
(#206)Published by ForbesLindesay almost 3 years ago
Update the default image for tests to mysql:8.0.23
(#206)
If you are using the @databases/mysql-test
package to create temporary databases, you will now get version 8.0.23 by default. If you want to maintain the old behaviour, you need to specify:
{
"test": {
"image": "mysql:5.7.24"
}
}
in your mysql config.
Add config for type generation (#206)
Add readMySqlConfigSync
method (#206)
This lets you read MySQL config for a specific file
Add DEFAULT_CONFIG
export (#206)
Published by ForbesLindesay almost 3 years ago
Block unexpected fields on .insert(...)
calls (#203)
This update uses conditional types in TypeScript to produce a type error if you add extra fields to objects you pass to .insert(...)
that are not defined in the database schema.
Add tableName
property to Table
(#202)
Add tableId
property to Table
(#202)
Published by ForbesLindesay almost 3 years ago
pgFormat
(#202)Published by ForbesLindesay almost 3 years ago
Automatically handle connection limit exceeded errors (#201)
This automatically handles the error:
too many connections for role "role_name"
from Postgres, providing we were able to create at least 1 connection for the pool. It will attempt to create connections again 5 seconds after encountering this error.