| Age | Commit message (Collapse) | Author |
|
The Row type has been replaced with Meta type with more flexibility
and features for generating type-safe SQL DML.
|
|
HTTP request now implicitly create request with context.
Any false positive related to not closing HTTP response body has been
annotated with "nolint:bodyclose".
In the example code, use consistent "// Output:" comment format, by
prefixing with single space.
Any comment on code now also prefixing with single space.
An error returned without variables now use [errors.New] instead of
[fmt.Errorf].
Any error returned using [fmt.Errorf] now wrapped using "%w" instead of
"%s".
Also, replace error checking using [errors.Is] or [errors.As], instead
of using equal/not-equal operator.
Any statement like "x = x OP y" now replaced with "x OP= y".
Also, swap statement is simplified using "x, y = y, x".
Any switch statement with single case now replaced with if-condition.
Any call to defer on function or program that call [os.Exit], now
replaced by calling the deferred function directly.
Any if-else condition now replaced with switch statement, if possible.
|
|
Meta contains the DML meta data, including driver name, list of column
names, list of column holders, and list of values.
The Meta type replace the Row type.
|
|
|
|
Previously, we use the string as parameter to set the returned place
holders.
This commit changes the parameter to the driver name so if the value
is "postgres" the place holders will be returned as counter, for example
"$1", "$2", and so on.
|
|
This is to make sure that any test that use the package always
predictable.
While at it, add paramter to change placeholder on ExtractSQLFields.
|
|
|
|
|