Skip to content

Releases: nullism/bqb

v1.7.2 - Minor fixes

29 Apr 21:21
Compare
Choose a tag to compare

This release includes an escaped parameter fix for nested queries. Thanks to @djpalm801 for the issue and fix.

v1.7.1 Continued PGSQL query parameter performance

18 Oct 02:46
a927dec
Compare
Choose a tag to compare

This updates the work by @benjic to avoid re-scanning the SQL string for each parameter.

This uses a StringBuilder instead of a custom scanner solution, performance seems similar.

v1.7.0 Query builder now uses a scanner

18 Oct 00:20
Compare
Choose a tag to compare
Pre-release

This release comes with some substantial performance improvements to PGSQL dialect queries with lots of parameters.

Instead of re-scanning the string (strings.Replace) for each parameter, it now does a sequential single scan, providing a 900% speed improvement for lots (order of 1K) of parameters.

Thanks to @benjic for the idea and implementation.

v1.6.2 Fix to error propagation

12 Oct 20:45
Compare
Choose a tag to compare

This release contains a fix to the way errors were being discarded from subqueries for a given query.

This has been tested locally by myself, and Henrik was kind enough to include test coverage such that we're still at 100%.

Thanks to @HenrikPoulsen for fixing this.

v1.6.1 Minor typo fixes

01 Jul 13:54
Compare
Choose a tag to compare

This release contains only an error message typo fix and updates to some tests.

v1.6.0 Remove panics and add Embedded type

29 Jun 04:12
Compare
Choose a tag to compare

This release contains the new Embedded type. Embedded, like Embedder, produces a raw value for a query. It differs from Embedder in that it can be used as a string:

	q := bqb.New("embedded: ?, unembedded: ?", bqb.Embedded("raw"), "bound")
	q.Print()
	// Prints:
	// SQL: embedded: "one"."two"."""three""", unembedded: ?
	// PARAMS: [bound]

NOTE This release also removes panics. This was done to minimize runtime crashes. Since this utilizes the existing error return for the ToX methods it should not cause any crashes. This means that extra or missing params in queries bqb.New("? ?", 1) or bqb.New("", 1) now return an error when converting to SQL which seems like the agreed upon proper way to handle this.

v1.5.0 Add Embedder support

26 Jun 14:34
6b8f601
Compare
Choose a tag to compare

This release provides a new type of Embedder that is covered in types_test.go and has an example.

@dschep rightly pointed out that there's not a good way to embed raw values in the query string. By using a Embedder implementation a query can be made more readable by embedding values for replacement with ?.

Note: These values are not bound, so an Embedder implementation should be careful to whitelist or sanitize any untrusted input.

v1.4.0 driver.Valuer support and Go 1.20

20 Jun 14:25
Compare
Choose a tag to compare

The minor release upgrades to Go v1.20 as well as contains support for driver.Valuer as a query parameter thanks to @allanglen.

v1.3.1 Minor Release

13 Feb 04:50
807385f
Compare
Choose a tag to compare

Massive speed improvement for MySQL and SQL dialects in cases where very large array parameters are required (10K+).

v1.3.0 Minor Release

12 Feb 23:37
112a51f
Compare
Choose a tag to compare

This change is just an update from Go 1.17 to Go 1.19.