sql-template-tag

ES2015 tagged template string for preparing SQL statements, works with `pg`, `mysql`, and `sqlite`

MIT License

Downloads
108.6K
Stars
340

Bot releases are hidden (Show)

sql-template-tag - Documentation: Native OracleDB support Latest Release

Published by blakeembrey 6 months ago

Added

Fixed

  • Add missing template to example (#39) thanks to @menduz

https://github.com/blakeembrey/sql-template-tag/compare/v5.2.0...v5.2.1

sql-template-tag - OracleDB support

Published by blakeembrey 11 months ago

sql-template-tag - Bulk method and readonly input types

Published by blakeembrey about 1 year ago

Added

  • Add bulk method (#31) 51ed0bc
  • Mark all inputs as readonly caf47b0

https://github.com/blakeembrey/sql-template-tag/compare/v5.0.3...v5.1.0

sql-template-tag - Set `Value` type to `unknown`

Published by blakeembrey over 2 years ago

sql-template-tag - Performance improvements

Published by blakeembrey over 2 years ago

Improved performance across the main use-cases:

  • Constructor shows 4% improvement
  • sql method shows 14% improvement
  • text method shows 4% improvement

These are pretty minor adjustments so feel free to test it on your OS and JS configurations to confirm whether these changes help.

sql-template-tag - Allow `Date` as value type

Published by blakeembrey over 2 years ago

Fixed

  • Allow using Date as a value (#26) 91dff99

https://github.com/blakeembrey/sql-template-tag/compare/v5.0.0...v5.0.1

sql-template-tag - ES Module

Published by blakeembrey over 2 years ago

Changed

  • Properly type check objects 16b4ede
  • Remove older cruft around enumerable properties and duplicated exports a978eed
  • Bump node 12 depenency 662f2fc
  • Build for ES modules bec0263

Added

  • Add mssql recipe to README 36c9db4

https://github.com/blakeembrey/sql-template-tag/compare/v4.1.0...v5.0.0

sql-template-tag - Remove `util` dependency

Published by blakeembrey over 2 years ago

Fixed/changed

  • Use inspect symbol over import d1fb92e (to support browsers)
  • Rename default export to sql (#15) a10d034

https://github.com/blakeembrey/sql-template-tag/compare/v4.0.0...v4.1.0

sql-template-tag - Use Plain Template Strings

Published by blakeembrey about 4 years ago

In the initial release I used raw strings, but this creates confusion and bugs on how the string should be interpreted, preferring to use the plain JS strings instead (more info at #11).

sql-template-tag - Performance Improvements

Published by blakeembrey over 4 years ago

Fixed

  • 3x faster, 4x less memory overhead

Changed

  • Removed access to raw* properties (previously protected properties)
sql-template-tag - Enumerable getters

Published by blakeembrey almost 5 years ago

  • Make getters enumerable for MySQL support (#5)
  • Throw error when using join for empty arrays (#4)
sql-template-tag - Cache SQL and values output

Published by blakeembrey over 5 years ago

Added

  • Cache SQL (text and sql properties) and values output to reduce repeated usage overhead
sql-template-tag - Default Export

Published by blakeembrey over 5 years ago

Added

  • Export sqltag as default export
sql-template-tag - Allow undefined and null

Published by blakeembrey over 5 years ago

Fixed

  • Allow undefined and null as values in TypeScript
sql-template-tag - Documentation Updates

Published by blakeembrey over 6 years ago

Added

  • package.json description
  • README changes
sql-template-tag - Initial Release

Published by blakeembrey over 6 years ago

Module for building SQL queries from tagged template strings in JavaScript.