Google Cloud Spanner driver for Go's database/sql package.

go-sql-spanner

go.dev reference

Google Cloud Spanner driver for Go's database/sql package.

This support is currently in the Preview release status.

import _ "github.com/googleapis/go-sql-spanner"

db, err := sql.Open("spanner", "projects/PROJECT/instances/INSTANCE/databases/DATABASE")
if err != nil {
    log.Fatal(err)
}

// Print tweets with more than 500 likes.
rows, err := db.QueryContext(ctx, "SELECT id, text FROM tweets WHERE likes > @likes", 500)
if err != nil {
    log.Fatal(err)
}
defer rows.Close()

var (
    id   int64
    text string
)
for rows.Next() {
    if err := rows.Scan(&id, &text); err != nil {
        log.Fatal(err)
    }
    fmt.Println(id, text)
}

Statements

Statements support follows the official Google Cloud Spanner Go client style arguments.

db.QueryContext(ctx, "SELECT id, text FROM tweets WHERE likes > @likes", 500)

db.ExecContext(ctx, "INSERT INTO tweets (id, text, rts) VALUES (@id, @text, @rts)", id, text, 10000)

db.ExecContext(ctx, "DELETE FROM tweets WHERE id = @id", 14544498215374)

Transactions

  • Read-write transactions always uses the strongest isolation level and ignore the user-specified level.
  • Read-only transactions do strong-reads by default. Read-only transactions must be ended by calling either Commit or Rollback. Calling either of these methods will end the current read-only transaction and return the session that is used to the session pool.
tx, err := db.BeginTx(ctx, &sql.TxOptions{}) // Read-write transaction.

tx, err := db.BeginTx(ctx, &sql.TxOptions{
    ReadOnly: true, // Read-only transaction using strong reads.
})

conn, _ := db.Conn(ctx)
_, _ := conn.ExecContext(ctx, "SET READ_ONLY_STALENESS='EXACT_STALENESS 10s'")
tx, err := conn.BeginTx(ctx, &sql.TxOptions{
    ReadOnly: true, // Read-only transaction using a 10 second exact staleness.
})

DDL Statements

DDL statements are not supported in transactions per Cloud Spanner restriction. Instead, run them on a connection without an active transaction:

db.ExecContext(ctx, "CREATE TABLE ...")

Multiple DDL statements can be sent in one batch to Cloud Spanner by defining a DDL batch:

conn, _ := db.Conn(ctx)
_, _ := conn.ExecContext(ctx, "START BATCH DDL")
_, _ = conn.ExecContext(ctx, "CREATE TABLE Singers (SingerId INT64, Name STRING(MAX)) PRIMARY KEY (SingerId)")
_, _ = conn.ExecContext(ctx, "CREATE INDEX Idx_Singers_Name ON Singers (Name)")
// Executing `RUN BATCH` will run the previous DDL statements as one batch.
_, _ := conn.ExecContext(ctx, "RUN BATCH")

See also the batch DDL example.

Examples

The examples directory contains standalone code samples that show how to use common features of Cloud Spanner and/or the database/sql package. Each standalone code sample can be executed without any prior setup, as long as Docker is installed on your local system.

Raw Connection / Specific Cloud Spanner Features

Use the Conn.Raw method to get access to a Cloud Spanner specific connection instance. This instance can be used to access Cloud Spanner specific features and settings, such as mutations, read-only staleness settings and commit timestamps.

conn, _ := db.Conn(ctx)
_ = conn.Raw(func(driverConn interface{}) error {
    spannerConn, ok := driverConn.(spannerdriver.SpannerConn)
    if !ok {
        return fmt.Errorf("unexpected driver connection %v, expected SpannerConn", driverConn)
    }
    // Use the `SpannerConn` interface to set specific Cloud Spanner settings or access
    // specific Cloud Spanner features.

    // Example: Set and get the current read-only staleness of the connection.
    _ = spannerConn.SetReadOnlyStaleness(spanner.ExactStaleness(10 * time.Second))
    _ = spannerConn.ReadOnlyStaleness()

    return nil
})

See also the examples directory for further code samples.

Emulator

See the Google Cloud Spanner Emulator support to learn how to start the emulator. Once the emulator is started and the host environmental flag is set, the driver should just work.

$ gcloud beta emulators spanner start
$ export SPANNER_EMULATOR_HOST=localhost:9010

Troubleshooting

The driver will retry any Aborted error that is returned by Cloud Spanner during a read/write transaction. If the driver detects that the data that was used by the transaction was changed by another transaction between the initial attempt and the retry attempt, the Aborted error will be propagated to the client application as an spannerdriver.ErrAbortedDueToConcurrentModification error.

Owner
Google APIs
Clients for Google APIs and tools that help produce them.
Google APIs
Comments
  • Discussion: Allow DDL statements in transactions?

    Discussion: Allow DDL statements in transactions?

    The initial (and current) implementation of the go-sql-spanner driver allows DDL statements to be executed using a transaction. That is however slightly confusing, as:

    1. The DDL statement is not really executed as part of the transaction, as Cloud Spanner does not support that. This means that the DDL statement will not be affected by any Commit or Rollback of the transaction, and the changes that are made by a DDL statement in a transaction are directly visible to all other transactions after it has been executed.
    2. This (currently) also means that DDL statements can be executed as part of a read-only transaction.

    My personal opinion is that we should disallow both the above as the statement is not part of the transaction. Accepting the statement and executing it outside of the transaction will probably cause more confusion than if we were to return an error in such a case. Note that a user can always execute a DDL statement when a transaction is active, but they will need to do so directly on the database instead of using a transaction.

    query := "CREATE TABLE Singers (SingerId INT64, FirstName STRING(100), LastName STRING(100)) PRIMARY KEY (SingerId)"
    
    // Start a (read/write) transaction.
    tx, err := db.BeginTx(context.Background(), &sql.TxOptions{})
    if err != nil {
      t.Fatal(err)
    }
    
    // This currently works but effectively executes the statement outside of the transaction.
    // The question is whether this should always return an error.
    res, err := tx.ExecContext(context.Background(), query)
    
    // It would always be possible to execute the following statement, also while the above transaction is
    // still active. (Note the difference: The above statement uses `tx`, the below statement uses `db`)
    res, err := db.ExecContext(context.Background(), query)
    

    What are your thoughts on this?

  • feat: add client side statement parser

    feat: add client side statement parser

    Adds a client side statement parser and support for:

    • DDL batches
    • DML batches
    • Partitioned DML

    DDL Batches

    DDL statements can be batched together using the START BATCH DDL statement:

    -- This marks the start of the DDL batch. All subsequent DDL statements will be cached
    -- locally and only sent to Spanner when the batch is executed.
    START BATCH DDL;
    
    CREATE TABLE Singers (SingerId INT64, FirstName STRING(MAX), LastName STRING(MAX)) PRIMARY KEY (SingerId);
    CREATE TABLE Albums (SingerId INT64, AlbumId INT64, Title STRING(MAX)) PRIMARY KEY (AlbumId), INTERLEAVE IN PARENT Singers;
    
    -- This will send the above DDL statements as one batch to Spanner.
    RUN BATCH;
    

    This implements what is also discussed here.

    DML Batches

    DML statements can be batched together using the START BATCH DML statement:

    -- This marks the start of the DML batch. All subsequent DML statements will be cached
    -- locally and only sent to Spanner when the batch is executed.
    START BATCH DML;
    
    INSERT INTO Singers (SingerId, FirstName, LastName) VALUES (1, 'First1', 'Last1');
    INSERT INTO Albums (SingerId, AlbumId, Title) VALUES (1, 1, 'Some title');
    
    -- This will send the above DML statements as one batch to Spanner.
    RUN BATCH;
    

    Partitioned DML

    Partitioned DML can be executed by executing SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC'.

    -- This tells a connection that any following DML statement should be executed using PDML
    -- instead of transactional DML.
    SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC';
    -- This will use a PDML transaction instead of a normal read/write transaction.
    DELETE FROM Singers WHERE TRUE;
    

    Fixes #16

  • test: add benchmarks

    test: add benchmarks

    Adds benchmarks that compare the performance of the go-sql driver with the normal Spanner client.

    Executing the benchmarks on a VM on Google Cloud that is physically close to the database that is being tested yields the following results:

    | Benchmark | go-sql | Client | |---------------------|----------------|-----------------| | SelectSingleRecord | 8027885 ns/op | 7605408 ns/op | | SelectAndUpdateUsingMutation | 16588398 ns/op | 15454486 ns/op | | SelectAndUpdateUsingDml | 20143182 ns/op | 21006488 ns/op | | CreateAndReload | 16834755 ns/op | 16987523 ns/op | | CreateAlbumsUsingMutations. | 22605913 ns/op | 23259244 ns/op | | Select100Singers | 92737263 ns/op | 94163536 ns/op | | Select100SingersInReadOnlyTx | 96486050 ns/op | 96695674 ns/op | | Select100SingersInReadWriteTx | 130437345 ns/op | 124886457 ns/op |

    Closes #33

  • Dependency Dashboard

    Dependency Dashboard

    This issue provides visibility into Renovate updates and their statuses. Learn more

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


    • [ ] Check this box to trigger a request for Renovate to run again on this repository
  • feat: Add ARRAY support

    feat: Add ARRAY support

    Should not be merged before #10 (or should be merged instead of #10, as they both contain the same changes).

    • Adds support ARRAY data type.
    • Adds GitHub Actions configuration for running unit tests during pre-submits.
    • Adds the mock server from the Go client library so it is no longer depending on internal test code.
  • panic on DSN that does not match regexp

    panic on DSN that does not match regexp

    If, for example, the DSN has project instead of projects (such as "project/p/instances/i/databases/d") this library panics as it tries to access the matches in the extractConnectorConfig() function.

  • chore(main): release 1.0.0

    chore(main): release 1.0.0

    :robot: I have created a release beep boop

    1.0.0 (2022-09-15)

    Features

    • Add ARRAY support (#19) (6b1556a)
    • Add client side statement parser (#38) (969bf52)
    • Add support for JSON data type (#39) (ef52036)
    • Add support for stale reads (#44) (2e3a264)
    • Add support of positional parameter in the queries (#110) (a71a457)
    • Allow host in dsn and use statement based transactions (#10) (0528e13)
    • Create standalone samples that run against emulator (#30) (22b127e)
    • Support getting the commit timestamp of a transaction or statement (#52) (802e7be)
    • Support mutations (#43) (2d698b7)

    Bug Fixes

    • Add ddl support and change tests to run ddl from driver (259f98b)
    • Added ddl support to driver, changed tests to call driver rather than api directly (a9c4c8a)
    • Allow users to specify custom credentials (#57) (1715929)
    • Always set a value for dest in Next (#34) (7b8190c)
    • Check named value parameter types (#35) (f260dd2)
    • deps: Update all modules (#108) (2d13f6d)
    • deps: Update google.golang.org/genproto commit hash (#78) (c9ed2ac)
    • deps: Update google.golang.org/genproto commit hash to 1739428 (#81) (3f6ba94)
    • deps: Update module cloud.google.com/go to v0.100.2 (#71) (cac55f0)
    • deps: Update module cloud.google.com/go to v0.102.1 (#103) (23d315e)
    • deps: Update module cloud.google.com/go/spanner to v1.29.0 (#74) (9a676ba)
    • deps: Update module github.com/google/go-cmp to v0.5.7 (#80) (cae3a7a)
    • deps: Update module github.com/google/uuid to v1.3.0 (#75) (2072930)
    • deps: Update module google.golang.org/api to v0.68.0 (#76) (8af9417)
    • deps: Update module google.golang.org/grpc to v1.44.0 (#82) (7b20269)
    • Do not parse hints as parameters (#45) (56243a5)
    • Pass userAgent in client config (#118) (2c97068)
    • Race condition when opening multiple connections in parallel as first action (#59) (0971f81)
    • Refuse DDL during transactions (#41) (4e7fa97), refs #31
    • Standardize returned errors (#32) (e780348), refs #14
    • Use correct type for decoding bytes (49d08fc)

    Documentation

    • Add comments to all samples to document what they do and how to use them (#46) (17a434f)
    • Add DDL batch sample (#48) (82a23e4)
    • Add documentation about contributing (fd70120)
    • Add sample for all data types (#51) (5a0129b)
    • Add sample for DML batches (#49) (bac4a4c)
    • Add sample for PDML (#53) (9bd832b)
    • Add sample for read-only transaction (#47) (306c4ea)
    • Cleanup and extend readme (#60) (2d64f82)
    • Remove disclaimer from README (#93) (12780e5)

    Miscellaneous Chores


    This PR was generated with Release Please. See documentation.

  • deprecate fix(deps): update module cloud.google.com/go to v0.103.0

    deprecate fix(deps): update module cloud.google.com/go to v0.103.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | cloud.google.com/go | require | minor | v0.102.1 -> v0.104.0 |


    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

  • fix(deps): update module cloud.google.com/go/spanner to v1.32.0 - autoclosed

    fix(deps): update module cloud.google.com/go/spanner to v1.32.0 - autoclosed

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | cloud.google.com/go/spanner | require | minor | v1.29.0 -> v1.32.0 |


    Configuration

    πŸ“… Schedule: "before 3am on Monday" (UTC).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • fix(deps): update module cloud.google.com/go/spanner to v1.31.0 - autoclosed

    fix(deps): update module cloud.google.com/go/spanner to v1.31.0 - autoclosed

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | cloud.google.com/go/spanner | require | minor | v1.29.0 -> v1.31.0 |


    Configuration

    πŸ“… Schedule: "before 3am on Monday" (UTC).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • deprecate: fix(deps): update google.golang.org/genproto digest to 37a418b

    deprecate: fix(deps): update google.golang.org/genproto digest to 37a418b

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google.golang.org/genproto | require | digest | 2234105 -> 2692e88 |


    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

  • driver: Enable/respect driver.Valuer interface

    driver: Enable/respect driver.Valuer interface

    This extends CheckNamedValue to respect the driver.Valuer interface.

    note: I realize this repository does not accept direct contributions and I am opening this as a nudge/suggestion.

    Fixes #135

  • chore(deps): update google-github-actions/setup-gcloud action to v1

    chore(deps): update google-github-actions/setup-gcloud action to v1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google-github-actions/setup-gcloud | action | major | v0 -> v1 |


    Release Notes

    google-github-actions/setup-gcloud

    v1

    Compare Source

    This is the floating v1 release.


    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update google-github-actions/auth action to v1

    chore(deps): update google-github-actions/auth action to v1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google-github-actions/auth | action | major | v0 -> v1 |


    Release Notes

    google-github-actions/auth

    v1

    Compare Source

    Floating v1 alias


    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • fix(deps): update module cloud.google.com/go to v0.105.0

    fix(deps): update module cloud.google.com/go to v0.105.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | cloud.google.com/go | require | minor | v0.104.0 -> v0.107.0 |


    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • fix(deps): update module google.golang.org/grpc to v1.51.0

    fix(deps): update module google.golang.org/grpc to v1.51.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | google.golang.org/grpc | require | minor | v1.49.0 -> v1.51.0 |


    Release Notes

    grpc/grpc-go

    v1.51.0: Release 1.51.0

    Compare Source

    Behavior Changes

    • xds: NACK EDS resources with duplicate addresses in accordance with a recent spec change (#​5715)
    • grpc: restrict status codes that can be generated by the control plane (gRFC A54) (#​5653)

    New Features

    • client: set grpc-accept-encoding header with all registered compressors (#​5541)
    • xds/weightedtarget: return a more meaningful error when all child policies are in TRANSIENT_FAILURE (#​5711)
    • gcp/observability: add "started rpcs" metric (#​5768)
    • xds: de-experimentalize the google-c2p-resolver (#​5707)
    • balancer: add experimental Producer types and methods (#​5669)
    • orca: provide a way for LB policies to receive OOB load reports (#​5669)

    Bug Fixes

    • go.mod: upgrade x/text dependency to address CVE 2022-32149 (#​5769)
    • client: fix race that could lead to an incorrect connection state if it was closed immediately after the server's HTTP/2 preface was received (#​5714)
    • xds: ensure sum of the weights of all EDS localities at the same priority level does not exceed uint32 max (#​5703)
    • client: fix binary logging bug which logs a server header on a trailers-only response (#​5763)
    • balancer/priority: fix a bug where unreleased references to removed child policies (and associated state) was causing a memory leak (#​5682)
    • xds/google-c2p: validate URI schema for no authorities (#​5756)

    v1.50.1: Release 1.50.1

    Compare Source

    New Features

    • gcp/observability: support new configuration defined in public preview user guide

    v1.50.0: Release 1.50.0

    Compare Source

    Behavior Changes

    • client: use proper "@​" semantics for connecting to abstract unix sockets. (#​5678)

      • This is technically a bug fix; the result is that the address was including a trailing NULL byte, which it should not have. This may break users creating the socket in Go by prefixing a NULL instead of an "@​", though, so calling it out as a behavior change.

    New Features

    Bug Fixes

    • client: fix deadlock in transport caused by GOAWAY racing with stream creation (#​5652)
      • This should only occur with an HTTP/2 server that does not follow best practices of an advisory GOAWAY (not a grpc-go server).
    • xds/xdsclient: fix a bug which was causing routes with cluster_specifier_plugin set to be NACKed when GRPC_EXPERIMENTAL_XDS_RLS_LB was off (#​5670)
    • xds/xdsclient: NACK cluster resource if config_source_specifier in lrs_server is not self (#​5613)
    • xds/ringhash: fix a bug which sometimes prevents the LB policy from retrying connection attempts (#​5601)
    • xds/ringhash: do nothing when asked to exit IDLE instead of falling back on the default channel behavior of connecting to all addresses (#​5614)
    • xds/rls: fix a bug which was causing the channel to be stuck in IDLE (#​5656)
    • alts: fix a bug which was setting WaitForReady on handshaker service RPCs, thereby delaying fallback when required (#​5620)
    • gcp/observability: fix End() to cleanup global state correctly (#​5623)

    Configuration

    πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

Spansqlx - Spanner sql pkgs with golang

spansqlx spanner sql pkgs install go get github.com/reiot777/spansqlx usage Bel

Jan 15, 2022
Attach hooks to any database/sql driver

sqlhooks Attach hooks to any database/sql driver. The purpose of sqlhooks is to provide a way to instrument your sql statements, making really easy to

Jan 6, 2023
BigQuery database/sql golang driver

BigQuery SQL Driver This library is compatible with Go 1.17+ Please refer to CHA

Dec 7, 2022
Otelsql - OpenTelemetry SQL database driver wrapper for Go
Otelsql - OpenTelemetry SQL database driver wrapper for Go

OpenTelemetry SQL database driver wrapper for Go Add a OpenTelemetry wrapper to

Dec 15, 2022
Go-driver-benchmark - Driver benchmark with golang

We use ClickkHouse for time-series databases, and the driver's performance is ve

Sep 5, 2022
Dumpling is a fast, easy-to-use tool written by Go for dumping data from the database(MySQL, TiDB...) to local/cloud(S3, GCP...) in multifarious formats(SQL, CSV...).

?? Dumpling Dumpling is a tool and a Go library for creating SQL dump from a MySQL-compatible database. It is intended to replace mysqldump and mydump

Nov 9, 2022
sqlcomment is an ent driver that adds SQL comments following sqlcommenter specification.

sqlcomment sqlcomment is an ent driver that adds SQL comments following sqlcommenter specification. sqlcomment includes support for OpenTelemetry and

Nov 14, 2022
A go package to add support for data at rest encryption if you are using the database/sql.

go-lockset A go package to add support for data at rest encryption if you are using the database/sql to access your database. Installation In your Gol

Jan 30, 2022
Package dbi implements an experimental database/sql wrapper.

dbi Package dbi implements a database/sql wrapper. This is an EXPERIMENTAL package used for experimenting. Installation The recommended way to install

Feb 8, 2022
A fully-featured AWS Athena database driver (+ athenareader https://github.com/uber/athenadriver/tree/master/athenareader)
A fully-featured AWS Athena database driver (+ athenareader https://github.com/uber/athenadriver/tree/master/athenareader)

?? athenadriver - A fully-featured AWS Athena database driver for Go ?? athenareader - A moneywise command line utililty to query athena in command li

Jan 3, 2023
Apache H2 Database Go Driver

Apache H2 Database Go Driver This driver is VERY experimental state NOT use for production yet Introduction Apache H2 Database is a very-low footprint

Nov 27, 2022
Golang database driver for SQLite

go-sqlite Golang database driver for SQLite. Does not use cgo. This driver is based on pure-Go SQLite implementation (https://gitlab.com/cznic/sqlite)

Dec 30, 2022
write APIs using direct SQL queries with no hassle, let's rethink about SQL

SQLer SQL-er is a tiny portable server enables you to write APIs using SQL query to be executed when anyone hits it, also it enables you to define val

Jan 7, 2023
Parses a file and associate SQL queries to a map. Useful for separating SQL from code logic

goyesql This package is based on nleof/goyesql but is not compatible with it any more. This package introduces support for arbitrary tag types and cha

Oct 20, 2021
Go-sql-reader - Go utility to read the externalised sql with predefined tags

go-sql-reader go utility to read the externalised sql with predefined tags Usage

Jan 25, 2022
Query and Provision Cloud Infrastructure using an extensible SQL based grammar
Query and Provision Cloud Infrastructure using an extensible SQL based grammar

Deploy, Manage and Query Cloud Infrastructure using SQL [Documentation] [Developer Guide] Cloud infrastructure coding using SQL InfraQL allows you to

Oct 25, 2022
Go package providing simple database and server interfaces for the CSV files produced by the sfomuseum/go-libraryofcongress package
Go package providing simple database and server interfaces for the CSV files produced by the sfomuseum/go-libraryofcongress package

go-libraryofcongress-database Go package providing simple database and server interfaces for the CSV files produced by the sfomuseum/go-libraryofcongr

Oct 29, 2021
sqlx is a library which provides a set of extensions on go's standard database/sql library

sqlx is a library which provides a set of extensions on go's standard database/sql library. The sqlx versions of sql.DB, sql.TX, sql.Stmt, et al. all leave the underlying interfaces untouched, so that their interfaces are a superset on the standard ones. This makes it relatively painless to integrate existing codebases using database/sql with sqlx.

Jan 7, 2023
Additions to Go's database/sql for super fast performance and convenience.

gocraft/dbr (database records) gocraft/dbr provides additions to Go's database/sql for super fast performance and convenience. $ go get -u github.com/

Jan 1, 2023