You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sqlz (pronounced "sequelize") is an un-opinionated, un-obtrusive SQL query builder for Go projects, based on [sqlx](https://github.com/jmoiron/sqlx/).
12
+
**sqlz** (pronounced "sequelize") is an un-opinionated, un-obtrusive SQL query builder for Go projects, based on [sqlx](https://github.com/jmoiron/sqlx/).
13
13
14
14
As opposed to other query builders, sqlz does not mean to bridge the gap between different SQL servers and implementations by
15
15
providing a unified interface. Instead, it aims to support an extended SQL syntax that may be implementation-specific. For
16
16
example, if you wish to use PostgreSQL-specific features such as JSON operators and upsert statements, sqlz means to support
17
17
these without caring if the underlying database backend really is PostgreSQL. In other words, sqlz builds whatever queries
18
18
you want it to build.
19
19
20
-
sqlz is easy to integrate into existing code, as it does not require you to create your database connections through the
21
-
sqlz API; in fact, it doesn't supply one. You can either use your existing `*sql.DB` connection or an `*sqlx.DB` connection,
20
+
**sqlz** is easy to integrate into existing code, as it does not require you to create your database connections through the
21
+
**sqlz** API; in fact, it doesn't supply one. You can either use your existing `*sql.DB` connection or an `*sqlx.DB` connection,
22
22
so you can start writing new queries with sqlz without having to modify any existing code.
23
23
24
-
sqlz leverages sqlx for easy loading of query results. Please make sure you are familiar with [how sqlx works](https://jmoiron.github.io/sqlx/)
24
+
**sqlz** leverages **sqlx** for easy loading of query results. Please make sure you are familiar with [how sqlx works](https://jmoiron.github.io/sqlx/)
25
25
in order to understand how row scanning is performed. You may need to add `db` struct tags to your Go structures.
26
26
27
-
sqlz provides a comfortable API for running queries in a transaction, and will automatically commit or rollback the
27
+
**sqlz** provides a comfortable API for running queries in a transaction, and will automatically commit or rollback the
28
28
transaction as necessary.
29
29
30
30
## Install
@@ -38,7 +38,7 @@ go get -u github.com/ido50/sqlz
38
38
Once installed, you can import sqlz into your Go packages. To build and execute queries with
39
39
sqlz, you need to pass the underlying `*sql.DB` or `*sqlx.DB` objects. If using `database/sql`,
40
40
you'll need to tell sqlz the name of the driver (so that it knows which placeholders to use
41
-
when building queries); if using `jmoiron/sqlx`, this is not necessary.
41
+
when building queries); if using `github.com/jmoiron/sqlx`, this is not necessary.
0 commit comments