atdatabases

TypeScript clients for databases that prevent SQL Injection

MIT License

Downloads
4.4M
Stars
588
Committers
23

Bot releases are visible (Hide)

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Refactorings

  • Remove unused postgresFormatter code (#121)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Upgrades @databases/pg to version 3.0.0 (#118)

    This impacts how connection strings are handled.

  • Update compile target to node 12.19.0 (#115)

Refactorings

  • Updated @databases/sql to 3.0.0 (#114)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • The Connection TypeScript type has been renamed to Queryable (#118)

  • Upgrades @databases/pg to version 3.0.0 (#118)

    This impacts how connection strings are handled.

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Upgrades @databases/pg to version 3.0.0 (#118)

    This impacts how connection strings are handled, and may also result in other subtle breaking changes.

  • BIGINTs are now returned as the builtin bigint type in JavaScript/TypeScript (#118)

  • The Connection TypeScript type has been renamed to Queryable (#118)

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Renamed the following options (#118)

    • The bigIntAsString option has been replaced with the bigIntMode option. It still defaults to 'number' but a future major version may change the default to 'bigint'. I recommend you set it explicitly to the value you want.
    • The application_name option has been renamed to applicationName
    • The fallback_application_name option has been renamed to fallbackApplicationName
    • The idleTimeoutMillis option has been renamed to idleTimeoutMilliseconds
    • The statement_timeout option has been renamed to statementTimeoutMilliseconds
    • The query_timeout option has been renamed to queryTimeoutMilliseconds
    • The error callback has been renamed to onError and no longer includes the client
  • Removed the following options (#118)

    • The noLocking option has been removed.
    • The noDuplicateDatabaseObjectsWarning option has been removed (along with the associated warning)
    • The pgFormatting option has been removed (we always use prepared statements now)
    • The pgNative option has been removed (it was incompatible with some features, and if you need that kind of extreme performance, you may be better off without @databases)
    • The promiseLib option has been removed (we didn't always honour it, and everyone should be using the builtin promise implementation anyway)
    • The capSQL option has been removed (we don't generate any SQL for you)
    • The noWarnings option has been removed (we don't have many warnings)
    • The binary option has been removed (many internal features of @databases would not function when this is enabled)
    • The client_encoding option has been removed (the underlying parser assumes "utf8" no matter what you passed anyway)
    • The encoding option has been removed (this is for the same reason as client_encoding)
    • The isDomainSocket option has been removed (it is unclear if this ever worked. Open an issue if you need this.)
    • The parseInputDatesAsUTC option has been removed (the underlying library does not suport specifying this on a per-connection basis)
    • The row option has been removed (it never made sense to specify this here)
  • Removed event handlers (previously passed via options) (#118)

    • The connect event has been removed
    • The disconnect event has been removed
    • The query event has been removed
    • The receive event has been removed
    • The task event has been removed
    • The transact event has been removed
    • The extend event has been removed
    • The error callback has been renamed to onError and no longer includes the client
  • New options (#118)

    • connectionTimeoutMilliseconds defaults to 10 seconds
    • maxUses defaults to Infinity, this is the maximum number of times a connection can be retrieved from the pool before being recycled.
    • keepAliveInitialDelayMilliseconds specifies the TCP keepalive interval (when enabled via the keepAlive option)
    • idleInTransactionSessionTimeoutMilliseconds number of milliseconds before terminating any session with an open idle transaction, default is no timeout
    • types allows you to specify custom type parsers when creating a connection (See pg/src/TypeOverrides.ts for details)
  • createConectionPool now takes a single parameter containing all options (#118)

    To pass both a connection string, and other options, you can use createConnectionPool({connectionString: '...', ...otherOptions}) This replaces the arbitrary split between connection details and "options"

  • Replace the old Connection type with the new Queryable (#118)

    We now have 4 clear types:

    • Transaction - a database transaction
    • Connection - a single connection to the database
    • ConnectionPool - a pool of connections to the database
    • Queryable - an interface representing the common methods that are available to all 3 other types.
  • The default sslmode is now "prefer" (#118)

    Previously, the default was to always attempt to connect without ssl, and fail if the server required SSL. This resulted in errors that were difficult to debug in many environments. The new default is "prefer", which always attempts to connect with SSL, and then disables SSL if the connection fails.

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries are no longer minified before being sent to Postgres
    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

New Features

  • Initial release (#116)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

New Features

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)
atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)

  • Updated @databases/sql to 3.0.0 (#114)

    This means:

    • queries no longer have .compile() or .compileMySQL() methods
    • queries no longer have .text or .values properties
    • SQLQuery is only a type, not a class.

    If you were previously using instanceof SQLQuery to check if a value is an SQLQuery, you can swap to using isSqlQuery.

    If you were relying on the properties or methods to get the actual query text, please open an issue.

atdatabases - @databases/[email protected]

Published by ForbesLindesay almost 4 years ago

Breaking Changes

  • Update compile target to node 12.19.0 (#115)