From ff1854f6400fd46af52a397ae96d06aacd14c9ba Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 3 Jun 2026 10:37:04 -0400 Subject: [PATCH] readme update --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13bc4ed..68429ae 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Lazy is a helper tool when working with [sqlx](https://github.com/jmoiron/sqlx)
## RandomGenerate -Generates random data for basic types and slices to be used with [sqlmock](https://github.com/DATA-DOG/go-sqlmock). Slices are given an arbitrary amount entries See [Mocks](#mocks) for more information. +Generates random data for basic types and slices to be used with [sqlmock](https://github.com/DATA-DOG/go-sqlmock). Slices are given an arbitrary amount entries See [Mocks](#mocks) for more information. Lazy supports many bind types using sqlx's Rebind method, however, due to this conversion queries that use operators like postgres' jsonb "?" operator cannot be paired with the BindQuestion option as sqlx will greedily replace all "?" causing syntax errors ```go func RandomGenerate(m Config) (*Mock, error) ``` @@ -73,7 +73,8 @@ func ExampleTest() { Query: "SELECT key, count FROM table WHERE key IN (?, ?)", Example: SqlResultsExample{}, Keys: []any{ 1, 6 }, - RowCount: 2, + RowCount: 2, + BindType: lazy.BindQuestion, } mock, err := lazy.GenerateRandom(cfg) if err != nil {