{"id":13414222,"url":"https://github.com/xo/usql","last_synced_at":"2026-01-08T01:22:40.384Z","repository":{"id":39420599,"uuid":"83678416","full_name":"xo/usql","owner":"xo","description":"Universal command-line interface for SQL databases","archived":false,"fork":false,"pushed_at":"2025-05-09T20:54:48.000Z","size":3285,"stargazers_count":9361,"open_issues_count":92,"forks_count":362,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-05-11T02:53:11.617Z","etag":null,"topics":["command-line","database","go","golang","mariadb","microsoft-sql-server","mysql","oracle","oracle-database","postgres","postgresql","sql","sqlite","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-02T13:03:21.000Z","updated_at":"2025-05-10T17:03:50.000Z","dependencies_parsed_at":"2023-02-16T11:16:21.409Z","dependency_job_id":"dc9fcc28-f01b-42a3-bcd8-3091ed93e831","html_url":"https://github.com/xo/usql","commit_stats":{"total_commits":1106,"total_committers":39,"mean_commits":"28.358974358974358","dds":0.6283905967450272,"last_synced_commit":"8519ebd9888c5120eb9e757e3a37914c7d04157e"},"previous_names":["knq/usql"],"tags_count":136,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xo%2Fusql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xo%2Fusql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xo%2Fusql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xo%2Fusql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xo","download_url":"https://codeload.github.com/xo/usql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253509775,"owners_count":21919587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","database","go","golang","mariadb","microsoft-sql-server","mysql","oracle","oracle-database","postgres","postgresql","sql","sqlite","sqlite3"],"created_at":"2024-07-30T21:00:16.720Z","updated_at":"2026-01-08T01:22:40.374Z","avatar_url":"https://github.com/xo.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/xo/usql-logo/master/usql.png\" height=\"120\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#installing\" title=\"Installing\"\u003eInstalling\u003c/a\u003e |\n  \u003ca href=\"#building\" title=\"Building\"\u003eBuilding\u003c/a\u003e |\n  \u003ca href=\"#database-support\" title=\"Database Support\"\u003eDatabase Support\u003c/a\u003e |\n  \u003ca href=\"#using\" title=\"Using\"\u003eUsing\u003c/a\u003e |\n  \u003ca href=\"#features-and-compatibility\" title=\"Features and Compatibility\"\u003eFeatures and Compatibility\u003c/a\u003e |\n  \u003ca href=\"https://github.com/xo/usql/releases\" title=\"Releases\"\u003eReleases\u003c/a\u003e |\n  \u003ca href=\"#contributing\" title=\"Contributing\"\u003eContributing\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n`usql` is a universal command-line interface for PostgreSQL, MySQL, Oracle\nDatabase, SQLite3, Microsoft SQL Server, [and many other databases][databases]\nincluding NoSQL and non-relational databases!\n\n`usql` provides a simple way to work with [SQL and NoSQL databases][databases]\nvia a command-line inspired by PostgreSQL's `psql`. `usql` supports most of the\ncore `psql` features, such as [variables][variables], [backticks][backticks],\n[backslash commands][commands] and has additional features that `psql` does\nnot, such as [multiple database support][databases], [copying between databases][copying],\n[syntax highlighting][highlighting], [context-based completion][completion],\nand [terminal graphics][termgraphics].\n\nDatabase administrators and developers that would prefer to work with a tool\nlike `psql` with non-PostgreSQL databases, will find `usql` intuitive,\neasy-to-use, and a great replacement for the command-line clients/tools\nfor other databases.\n\n[![Unit Tests][usql-ci-status]][usql-ci]\n[![Go Reference][goref-usql-status]][goref-usql]\n[![Releases][release-status]][Releases]\n[![Discord Discussion][discord-status]][discord]\n\n[usql-ci]: https://github.com/xo/usql/actions/workflows/test.yml \"Test CI\"\n[usql-ci-status]: https://github.com/xo/usql/actions/workflows/test.yml/badge.svg \"Test CI\"\n[goref-usql]: https://pkg.go.dev/github.com/xo/usql \"Go Reference\"\n[goref-usql-status]: https://pkg.go.dev/badge/github.com/xo/usql.svg \"Go Reference\"\n[release-status]: https://img.shields.io/github/v/release/xo/usql?display_name=tag\u0026sort=semver \"Latest Release\"\n[discord]: https://discord.gg/WDWAgXwJqN \"Discord Discussion\"\n[discord-status]: https://img.shields.io/discord/829150509658013727.svg?label=Discord\u0026logo=Discord\u0026colorB=7289da\u0026style=flat-square \"Discord Discussion\"\n[installing]: #installing \"Installing\"\n[databases]: #database-support \"Database Support\"\n[releases]: https://github.com/xo/usql/releases \"Releases\"\n\n## Installing\n\n`usql` can be installed [via Release][], [via Homebrew][], [via AUR][], [via\nScoop][], [via Go][], or [via Docker][]:\n\n[via Release]: #installing-via-release\n[via Homebrew]: #installing-via-homebrew-macos-and-linux\n[via AUR]: #installing-via-aur-arch-linux\n[via Scoop]: #installing-via-scoop-windows\n[via Go]: #installing-via-go\n[via Docker]: #installing-via-docker\n\n### Installing via Release\n\n1. [Download a release for your platform][releases]\n2. Extract the `usql` or `usql.exe` file from the `.tar.bz2` or `.zip` file\n3. Move the extracted executable to somewhere on your `$PATH` (Linux/macOS) or\n   `%PATH%` (Windows)\n\n### Installing via Homebrew (macOS and Linux)\n\nInstall `usql` from the [`xo/xo` tap][xo-tap] in the usual way with the [`brew`\ncommand][homebrew]:\n\n```sh\n# install usql with most drivers\n$ brew install xo/xo/usql\n```\n\nSupport for [ODBC databases][databases] is available through the `--with-odbc`\ninstall flag:\n\n```sh\n# add xo tap\n$ brew tap xo/xo\n\n# install usql with odbc support\n$ brew install --with-odbc usql\n```\n\n### Installing via AUR (Arch Linux)\n\nInstall `usql` from the [Arch Linux AUR][aur] in the usual way with the [`yay`\ncommand][yay]:\n\n```sh\n# install usql with most drivers\n$ yay -S usql\n```\n\nAlternately, build and [install using `makepkg`][arch-makepkg]:\n\n```sh\n$ git clone https://aur.archlinux.org/usql.git \u0026\u0026 cd usql\n$ makepkg -si\n==\u003e Making package: usql 0.12.10-1 (Fri 26 Aug 2022 05:56:09 AM WIB)\n==\u003e Checking runtime dependencies...\n==\u003e Checking buildtime dependencies...\n==\u003e Retrieving sources...\n  -\u003e Downloading usql-0.12.10.tar.gz...\n...\n```\n\n### Installing via Scoop (Windows)\n\nInstall `usql` using [Scoop](https://scoop.sh):\n\n```powershell\n# Optional: Needed to run a remote script the first time\n\u003e Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\n\n# install scoop if not already installed\n\u003e irm get.scoop.sh | iex\n\n# install usql with scoop\n\u003e scoop install usql\n```\n\n### Installing via Go\n\nInstall `usql` in the usual Go fashion:\n\n```sh\n# install latest usql version with base drivers\n$ go install github.com/xo/usql@latest\n\n# alternately, install usql with most drivers (see below for info about build tags)\n$ go install -tags most github.com/xo/usql@latest\n```\n\nSee [below for information](#building) on `usql` build tags.\n\n### Installing via Docker\n\nAn [official container image (`docker.io/usql/usql`)][docker-hub] is maintained\nby the `usql` team, and can be used with Docker, Podman, or other container\nruntime.\n\n[docker-hub]: https://hub.docker.com/r/usql/usql\n\nInstall `usql` with Docker, Podman, or other container runtime:\n\n```sh\n# run interactive shell and mount the $PWD/data directory as a volume for use\n# within the container\n$ docker run --rm -it --volume $(pwd)/data:/data docker.io/usql/usql:latest sqlite3://data/test.db\nTrying to pull docker.io/usql/usql:latest...\nGetting image source signatures\nCopying blob af48168d69d8 done   |\nCopying blob efc2b5ad9eec skipped: already exists\nCopying config 917ceb411d done   |\nWriting manifest to image destination\nConnected with driver sqlite3 (SQLite3 3.45.1)\nType \"help\" for help.\n\nsq:data/test.db=\u003e \\q\n\n# run postgres locally\n$ docker run --detach --rm --name=postgres --publish=5432:5432 --env=POSTGRES_PASSWORD=P4ssw0rd docker.io/usql/postgres\n\n# connect to local postgres instance\n$ docker run --rm --network host -it docker.io/usql/usql:latest postgres://postgres:P4ssw0rd@localhost\nConnected with driver postgres (PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1))\nType \"help\" for help.\n\npg:postgres@localhost=\u003e \\q\n\n# run specific usql version\n$ docker run --rm -it docker.io/usql/usql:0.19.3\n```\n\n## Building\n\nWhen building `usql` out-of-the-box with `go build` or `go install`, only the\n[`base` drivers][databases] for PostgreSQL, MySQL, SQLite3, Microsoft SQL\nServer, Oracle, CSVQ will be included in the build:\n\n```sh\n# build/install with base drivers (PostgreSQL, MySQL, SQLite3, Microsoft SQL Server,\n# Oracle, CSVQ)\n$ go install github.com/xo/usql@master\n```\n\nOther databases can be enabled by specifying the [build tag for their database\ndriver][databases].\n\n```sh\n# build/install with base, Avatica, and ODBC drivers\n$ go install -tags 'avatica odbc' github.com/xo/usql@master\n```\n\nFor every build tag `\u003cdriver\u003e`, there is also a `no_\u003cdriver\u003e` build tag\nthat will disable the driver:\n\n```sh\n# build/install most drivers, excluding Avatica, Couchbase, and PostgreSQL\n$ go install -tags 'most no_avatica no_couchbase no_postgres' github.com/xo/usql@master\n```\n\nBy specifying the build tags `most` or `all`, the build will include most, and\nall SQL drivers, respectively:\n\n```sh\n# build/install with most drivers (excludes CGO drivers and problematic drivers)\n$ go install -tags most github.com/xo/usql@master\n\n# build/install all drivers (includes CGO drivers and problematic drivers)\n$ go install -tags all github.com/xo/usql@master\n```\n\n## Database Support\n\n`usql` works with all Go standard library compatible SQL drivers supported by\n[`github.com/xo/dburl`][dburl].\n\nThe list of drivers that `usql` was built with can be displayed with the\n[`\\drivers` command][commands]:\n\n```sh\n$ cd $GOPATH/src/github.com/xo/usql\n\n# build excluding the base drivers, and including cassandra and moderncsqlite\n$ go build -tags 'no_postgres no_oracle no_sqlserver no_sqlite3 cassandra moderncsqlite'\n\n# show built driver support\n$ ./usql -c '\\drivers'\nAvailable Drivers:\n  cql [ca, scy, scylla, datastax, cassandra]\n  memsql (mysql) [me]\n  moderncsqlite [mq, sq, file, sqlite, sqlite3, modernsqlite]\n  mysql [my, maria, aurora, mariadb, percona]\n  tidb (mysql) [ti]\n  vitess (mysql) [vt]\n```\n\nThe above shows that `usql` was built with only the `mysql`, `cassandra` (ie,\n`cql`), and `moderncsqlite` drivers. The output above reflects information\nabout the drivers available to `usql`, specifically the internal driver name,\nits primary URL scheme, the driver's available scheme aliases (shown in\n`[...]`), and the real/underlying driver (shown in `(...)`) for wire compatible\ndrivers.\n\n### Supported Database Schemes and Aliases\n\nThe following are the [Go SQL drivers][go-sql] that `usql` supports, the\nassociated database, scheme / build tag, and scheme aliases:\n\n\u003c!-- DRIVER DETAILS START --\u003e\n\n| Database             | Scheme / Tag    | Scheme Aliases                                  | Driver Package / Notes                                                      |\n| -------------------- | --------------- | ----------------------------------------------- | --------------------------------------------------------------------------- |\n| PostgreSQL           | `postgres`      | `pg`, `pgsql`, `postgresql`                     | [github.com/lib/pq][d-postgres]                                             |\n| MySQL                | `mysql`         | `my`, `maria`, `aurora`, `mariadb`, `percona`   | [github.com/go-sql-driver/mysql][d-mysql]                                   |\n| Microsoft SQL Server | `sqlserver`     | `ms`, `mssql`, `azuresql`                       | [github.com/microsoft/go-mssqldb][d-sqlserver]                              |\n| Oracle Database      | `oracle`        | `or`, `ora`, `oci`, `oci8`, `odpi`, `odpi-c`    | [github.com/sijms/go-ora/v2][d-oracle]                                      |\n| SQLite3              | `sqlite3`       | `sq`, `sqlite`, `file`                          | [github.com/mattn/go-sqlite3][d-sqlite3] \u003csup\u003e[†][f-cgo]\u003c/sup\u003e              |\n| ClickHouse           | `clickhouse`    | `ch`                                            | [github.com/ClickHouse/clickhouse-go/v2][d-clickhouse]                      |\n| CSVQ                 | `csvq`          | `cs`, `csv`, `tsv`, `json`                      | [github.com/mithrandie/csvq-driver][d-csvq]                                 |\n|                      |                 |                                                 |                                                                             |\n| Alibaba MaxCompute   | `maxcompute`    | `mc`                                            | [sqlflow.org/gomaxcompute][d-maxcompute]                                    |\n| Alibaba Tablestore   | `ots`           | `ot`, `tablestore`                              | [github.com/aliyun/aliyun-tablestore-go-sql-driver][d-ots]                  |\n| Apache Avatica       | `avatica`       | `av`, `phoenix`                                 | [github.com/apache/calcite-avatica-go/v5][d-avatica]                        |\n| Apache H2            | `h2`            |                                                 | [github.com/jmrobles/h2go][d-h2]                                            |\n| Apache Hive          | `hive`          | `hi`, `hive2`                                   | [sqlflow.org/gohive][d-hive]                                                |\n| Apache Ignite        | `ignite`        | `ig`, `gridgain`                                | [github.com/amsokol/ignite-go-client/sql][d-ignite]                         |\n| Apache Impala        | `impala`        | `im`                                            | [github.com/sclgo/impala-go][d-impala]                                      |\n| AWS Athena           | `athena`        | `s3`, `aws`, `awsathena`                        | [github.com/uber/athenadriver/go][d-athena]                                 |\n| Azure CosmosDB       | `cosmos`        | `cm`, `gocosmos`                                | [github.com/btnguyen2k/gocosmos][d-cosmos]                                  |\n| Cassandra            | `cassandra`     | `ca`, `scy`, `scylla`, `datastax`, `cql`        | [github.com/MichaelS11/go-cql-driver][d-cassandra]                          |\n| ChaiSQL              | `chai`          | `ci`, `genji`, `chaisql`                        | [github.com/chaisql/chai][d-chai]                                           |\n| Couchbase            | `couchbase`     | `n1`, `n1ql`                                    | [github.com/couchbase/go_n1ql][d-couchbase]                                 |\n| Cznic QL             | `ql`            | `cznic`, `cznicql`                              | [modernc.org/ql][d-ql]                                                      |\n| Databend             | `databend`      | `dd`, `bend`                                    | [github.com/datafuselabs/databend-go][d-databend]                           |\n| Databricks           | `databricks`    | `br`, `brick`, `bricks`, `databrick`            | [github.com/databricks/databricks-sql-go][d-databricks]                     |\n| DuckDB               | `duckdb`        | `dk`, `ddb`, `duck`, `file`                     | [github.com/duckdb/duckdb-go/v2][d-duckdb] \u003csup\u003e[†][f-cgo]\u003c/sup\u003e            |\n| DynamoDb             | `dynamodb`      | `dy`, `dyn`, `dynamo`, `dynamodb`               | [github.com/btnguyen2k/godynamo][d-dynamodb]                                |\n| Exasol               | `exasol`        | `ex`, `exa`                                     | [github.com/exasol/exasol-driver-go][d-exasol]                              |\n| Firebird             | `firebird`      | `fb`, `firebirdsql`                             | [github.com/nakagami/firebirdsql][d-firebird]                               |\n| FlightSQL            | `flightsql`     | `fl`, `flight`                                  | [github.com/apache/arrow/go/v17/arrow/flight/flightsql/driver][d-flightsql] |\n| Google BigQuery      | `bigquery`      | `bq`                                            | [gorm.io/driver/bigquery/driver][d-bigquery]                                |\n| Google Spanner       | `spanner`       | `sp`                                            | [github.com/googleapis/go-sql-spanner][d-spanner]                           |\n| Microsoft ADODB      | `adodb`         | `ad`, `ado`                                     | [github.com/mattn/go-adodb][d-adodb]                                        |\n| ModernC SQLite3      | `moderncsqlite` | `mq`, `modernsqlite`                            | [modernc.org/sqlite][d-moderncsqlite]                                       |\n| MySQL MyMySQL        | `mymysql`       | `zm`, `mymy`                                    | [github.com/ziutek/mymysql/godrv][d-mymysql]                                |\n| Netezza              | `netezza`       | `nz`, `nzgo`                                    | [github.com/IBM/nzgo/v12][d-netezza]                                        |\n| PostgreSQL PGX       | `pgx`           | `px`                                            | [github.com/jackc/pgx/v5/stdlib][d-pgx]                                     |\n| Presto               | `presto`        | `pr`, `prs`, `prestos`, `prestodb`, `prestodbs` | [github.com/prestodb/presto-go-client/presto][d-presto]                     |\n| RamSQL               | `ramsql`        | `rm`, `ram`                                     | [github.com/proullon/ramsql/driver][d-ramsql]                               |\n| SAP ASE              | `sapase`        | `ax`, `ase`, `tds`                              | [github.com/thda/tds][d-sapase]                                             |\n| SAP HANA             | `saphana`       | `sa`, `sap`, `hana`, `hdb`                      | [github.com/SAP/go-hdb/driver][d-saphana]                                   |\n| Snowflake            | `snowflake`     | `sf`                                            | [github.com/snowflakedb/gosnowflake][d-snowflake]                           |\n| Trino                | `trino`         | `tr`, `trs`, `trinos`                           | [github.com/trinodb/trino-go-client/trino][d-trino]                         |\n| Vertica              | `vertica`       | `ve`                                            | [github.com/vertica/vertica-sql-go][d-vertica]                              |\n| VoltDB               | `voltdb`        | `vo`, `vdb`, `volt`                             | [github.com/VoltDB/voltdb-client-go/voltdbclient][d-voltdb]                 |\n| YDB                  | `ydb`           | `yd`, `yds`, `ydbs`                             | [github.com/ydb-platform/ydb-go-sdk/v3][d-ydb]                              |\n|                      |                 |                                                 |                                                                             |\n| GO DRiver for ORacle | `godror`        | `gr`                                            | [github.com/godror/godror][d-godror] \u003csup\u003e[†][f-cgo]\u003c/sup\u003e                  |\n| ODBC                 | `odbc`          | `od`                                            | [github.com/alexbrainman/odbc][d-odbc] \u003csup\u003e[†][f-cgo]\u003c/sup\u003e                |\n|                      |                 |                                                 |                                                                             |\n| Amazon Redshift      | `postgres`      | `rs`, `redshift`                                | [github.com/lib/pq][d-postgres] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e                      |\n| CockroachDB          | `postgres`      | `cr`, `cdb`, `crdb`, `cockroach`, `cockroachdb` | [github.com/lib/pq][d-postgres] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e                      |\n| OLE ODBC             | `adodb`         | `oo`, `ole`, `oleodbc`                          | [github.com/mattn/go-adodb][d-adodb] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e                 |\n| SingleStore MemSQL   | `mysql`         | `me`, `memsql`                                  | [github.com/go-sql-driver/mysql][d-mysql] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e            |\n| TiDB                 | `mysql`         | `ti`, `tidb`                                    | [github.com/go-sql-driver/mysql][d-mysql] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e            |\n| Vitess Database      | `mysql`         | `vt`, `vitess`                                  | [github.com/go-sql-driver/mysql][d-mysql] \u003csup\u003e[‡][f-wire]\u003c/sup\u003e            |\n|                      |                 |                                                 |                                                                             |\n|                      |                 |                                                 |                                                                             |\n|                      |                 |                                                 |                                                                             |\n| **NO DRIVERS**       | `no_base`       |                                                 | _no base drivers (useful for development)_                                  |\n| **MOST DRIVERS**     | `most`          |                                                 | _all stable drivers_                                                        |\n| **ALL DRIVERS**      | `all`           |                                                 | _all drivers, excluding bad drivers_                                        |\n| **BAD DRIVERS**      | `bad`           |                                                 | _bad drivers (broken/non-working drivers)_                                  |\n| **NO \u0026lt;TAG\u0026gt;**   | `no_\u003ctag\u003e`      |                                                 | _exclude driver with `\u003ctag\u003e`_                                               |\n\n[d-adodb]: https://github.com/mattn/go-adodb\n[d-athena]: https://github.com/uber/athenadriver\n[d-avatica]: https://github.com/apache/calcite-avatica-go\n[d-bigquery]: https://github.com/go-gorm/bigquery\n[d-cassandra]: https://github.com/MichaelS11/go-cql-driver\n[d-chai]: https://github.com/chaisql/chai\n[d-clickhouse]: https://github.com/ClickHouse/clickhouse-go\n[d-cosmos]: https://github.com/btnguyen2k/gocosmos\n[d-couchbase]: https://github.com/couchbase/go_n1ql\n[d-csvq]: https://github.com/mithrandie/csvq-driver\n[d-databend]: https://github.com/datafuselabs/databend-go\n[d-databricks]: https://github.com/databricks/databricks-sql-go\n[d-duckdb]: https://github.com/duckdb/duckdb-go\n[d-dynamodb]: https://github.com/btnguyen2k/godynamo\n[d-exasol]: https://github.com/exasol/exasol-driver-go\n[d-firebird]: https://github.com/nakagami/firebirdsql\n[d-flightsql]: https://github.com/apache/arrow/tree/main/go/arrow/flight/flightsql/driver\n[d-godror]: https://github.com/godror/godror\n[d-h2]: https://github.com/jmrobles/h2go\n[d-hive]: https://github.com/sql-machine-learning/gohive\n[d-ignite]: https://github.com/amsokol/ignite-go-client\n[d-impala]: https://github.com/sclgo/impala-go\n[d-maxcompute]: https://github.com/sql-machine-learning/gomaxcompute\n[d-moderncsqlite]: https://gitlab.com/cznic/sqlite\n[d-mymysql]: https://github.com/ziutek/mymysql\n[d-mysql]: https://github.com/go-sql-driver/mysql\n[d-netezza]: https://github.com/IBM/nzgo\n[d-odbc]: https://github.com/alexbrainman/odbc\n[d-oracle]: https://github.com/sijms/go-ora\n[d-ots]: https://github.com/aliyun/aliyun-tablestore-go-sql-driver\n[d-pgx]: https://github.com/jackc/pgx\n[d-postgres]: https://github.com/lib/pq\n[d-presto]: https://github.com/prestodb/presto-go-client\n[d-ql]: https://gitlab.com/cznic/ql\n[d-ramsql]: https://github.com/proullon/ramsql\n[d-sapase]: https://github.com/thda/tds\n[d-saphana]: https://github.com/SAP/go-hdb\n[d-snowflake]: https://github.com/snowflakedb/gosnowflake\n[d-spanner]: https://github.com/googleapis/go-sql-spanner\n[d-sqlite3]: https://github.com/mattn/go-sqlite3\n[d-sqlserver]: https://github.com/microsoft/go-mssqldb\n[d-trino]: https://github.com/trinodb/trino-go-client\n[d-vertica]: https://github.com/vertica/vertica-sql-go\n[d-voltdb]: https://github.com/VoltDB/voltdb-client-go\n[d-ydb]: https://github.com/ydb-platform/ydb-go-sdk\n\n\u003c!-- DRIVER DETAILS END --\u003e\n\n[f-cgo]: #f-cgo \"Requires CGO\"\n[f-wire]: #f-wire \"Wire compatible\"\n\n\u003cp\u003e\n  \u003ci\u003e\n    \u003ca id=\"f-cgo\"\u003e\u003csup\u003e†\u003c/sup\u003e Requires CGO\u003c/a\u003e\u003cbr\u003e\n    \u003ca id=\"f-wire\"\u003e\u003csup\u003e‡\u003c/sup\u003e Wire compatible (see respective driver)\u003c/a\u003e\n  \u003c/i\u003e\n\u003c/p\u003e\n\nAny of the protocol schemes/aliases above can be used in conjunction when\nconnecting to a database via the command-line or with the [`\\connect` and\n`\\copy` commands][commands]:\n\n```sh\n# connect to a vitess database:\n$ usql vt://user:pass@host:3306/mydatabase\n\n$ usql\n(not connected)=\u003e \\c vitess://user:pass@host:3306/mydatabase\n\n$ usql\n(not connected)=\u003e \\copy csvq://. pg://localhost/ 'select * ....' 'myTable'\n```\n\nSee [the section below on connecting to databases][connecting] for further\ndetails building DSNs/URLs for use with `usql`.\n\n## Using\n\nAfter [installing][], `usql` can be used similarly to the following:\n\n```sh\n# connect to a postgres database\n$ usql postgres://booktest@localhost/booktest\n\n# connect to an oracle database\n$ usql oracle://user:pass@host/oracle.sid\n\n# connect to a postgres database and run the commands contained in script.sql\n$ usql pg://localhost/ -f script.sql\n```\n\n### Command-line Options\n\nSupported command-line options:\n\n```sh\n$ usql --help\nusql, the universal command-line interface for SQL databases\n\nUsage:\n  usql [flags]... [DSN]\n\nArguments:\n  DSN   database url or connection name\n\nFlags:\n  -c, --command COMMAND                     run only single command (SQL or internal) and exit\n  -f, --file FILE                           execute commands from file and exit\n  -w, --no-password                         never prompt for password\n  -X, --no-init                             do not execute initialization scripts (aliases: --no-rc --no-psqlrc --no-usqlrc)\n  -o, --out FILE                            output file\n  -W, --password                            force password prompt (should happen automatically)\n  -1, --single-transaction                  execute as a single transaction (if non-interactive)\n  -v, --set NAME=VALUE                      set variable NAME to VALUE (see \\set command, aliases: --var --variable)\n  -N, --cset NAME=DSN                       set named connection NAME to DSN (see \\cset command)\n  -P, --pset VAR=ARG                        set printing option VAR to ARG (see \\pset command)\n  -F, --field-separator FIELD-SEPARATOR     field separator for unaligned and CSV output (default \"|\" and \",\")\n  -R, --record-separator RECORD-SEPARATOR   record separator for unaligned and CSV output (default \\n)\n  -T, --table-attr TABLE-ATTR               set HTML table tag attributes (e.g., width, border)\n  -A, --no-align                            unaligned table output mode\n  -H, --html                                HTML table output mode\n  -t, --tuples-only                         print rows only\n  -x, --expanded                            turn on expanded table output\n  -z, --field-separator-zero                set field separator for unaligned and CSV output to zero byte\n  -0, --record-separator-zero               set record separator for unaligned and CSV output to zero byte\n  -J, --json                                JSON output mode\n  -C, --csv                                 CSV output mode\n  -G, --vertical                            vertical output mode\n  -q, --quiet                               run quietly (no messages, only query output)\n      --config string                       config file\n  -V, --version                             output version information, then exit\n  -?, --help                                show this help, then exit\n```\n\n### Connecting to Databases\n\n`usql` opens a database connection by [parsing a URL][dburl] and passing the\nresulting connection string to [a database driver][databases]. Database\nconnection strings (aka \"data source name\" or DSNs) have the same parsing rules\nas URLs, and can be passed to `usql` via command-line, or to the [`\\connect`,\n`\\c`, and `\\copy` commands][commands].\n\nDatabase connections can be defined with [the `\\cset` command][connection-vars]\nor in [the `config.yaml` configuration file][config].\n\n#### Database Connection Strings\n\nDatabase connection strings look like the following:\n\n```txt\n  driver+transport://user:pass@host/dbname?opt1=a\u0026opt2=b\n  driver:/path/to/file\n  /path/to/file\n  name\n```\n\nWhere the above are:\n\n| Component                       | Description                                                                          |\n| ------------------------------- | ------------------------------------------------------------------------------------ |\n| `driver`                        | driver scheme name or scheme alias                                                   |\n| `transport`                     | `tcp`, `udp`, `unix` or driver name \u003ci\u003e(for ODBC and ADODB)\u003c/i\u003e                      |\n| `user`                          | username                                                                             |\n| `pass`                          | password                                                                             |\n| `host`                          | hostname                                                                             |\n| `dbname` \u003csup\u003e[±][f-path]\u003c/sup\u003e | database name, instance, or service name/ID                                          |\n| `?opt1=a\u0026...`                   | additional database driver options (see respective SQL driver for available options) |\n| `/path/to/file`                 | a path on disk                                                                       |\n| `name`                          | a connection name set by [`\\cset`][connection-vars] or in [`config.yaml`][config]    |\n\n[f-path]: #f-path \"URL Paths for Databases\"\n\n\u003cp\u003e\n  \u003ci\u003e\n    \u003ca id=\"f-path\"\u003e\n      \u003csup\u003e±\u003c/sup\u003e Some databases, such as Microsoft SQL Server, or Oracle\n      Database support a path component (ie, \u003ccode\u003e/dbname\u003c/code\u003e) in the form\n      of \u003ccode\u003e/instance/dbname\u003c/code\u003e, where \u003ccode\u003e/instance\u003c/code\u003e is the\n      optional service identifier (aka \"SID\") or database instance\n    \u003c/a\u003e\n  \u003c/i\u003e\n\u003c/p\u003e\n\n#### Driver Aliases\n\n`usql` supports the same driver names and aliases as [the `dburl`\npackage][dburl]. Databases have at least one or more aliases. See [`dburl`'s\nscheme documentation][dburl-schemes] for a list of all supported aliases.\n\n##### Short Aliases\n\nAll database drivers have a two character short form that is usually the first\ntwo letters of the database driver. For example, `pg` for `postgres`, `my` for\n`mysql`, `ms` for `sqlserver`, `or` for `oracle`, or `sq` for `sqlite3`.\n\n#### Passing Driver Options\n\nDriver options are specified as standard URL query options in the form of\n`?opt1=a\u0026opt2=b`. Refer to the [relevant database driver's documentation][databases]\nfor available options.\n\n#### Paths on Disk\n\nIf a URL does not have a `driver:` scheme, `usql` will check if it is a path on\ndisk. If the path exists, `usql` will attempt to use an appropriate database\ndriver to open the path.\n\nWhen the path is a Unix Domain Socket, `usql` will attempt to open it with the\nMySQL driver. When the path is a directory, `usql` will attempt to open it\nusing the PostgreSQL driver. And, lastly, when the path is a regular file,\n`usql` will attempt to open the file using the SQLite3 or DuckDB drivers.\n\n#### Driver Defaults\n\nAs with URLs, most components in the URL are optional and many components can\nbe left out. `usql` will attempt connecting using defaults where possible:\n\n```sh\n# connect to postgres using the local $USER and the unix domain socket in /var/run/postgresql\n$ usql pg://\n```\n\nSee the relevant documentation [on database drivers][databases] for more\ninformation.\n\n### Connection Examples\n\nThe following are example connection strings and additional ways to connect to\ndatabases using `usql`:\n\n```sh\n# connect to a postgres database\n$ usql pg://user:pass@host/dbname\n$ usql pgsql://user:pass@host/dbname\n$ usql postgres://user:pass@host:port/dbname\n$ usql pg://\n$ usql /var/run/postgresql\n$ usql pg://user:pass@host/dbname?sslmode=disable # Connect without SSL\n\n# connect to a mysql database\n$ usql my://user:pass@host/dbname\n$ usql mysql://user:pass@host:port/dbname\n$ usql my://\n$ usql /var/run/mysqld/mysqld.sock\n\n# connect to a sqlserver database\n$ usql sqlserver://user:pass@host/instancename/dbname\n$ usql ms://user:pass@host/dbname\n$ usql ms://user:pass@host/instancename/dbname\n$ usql mssql://user:pass@host:port/dbname\n$ usql ms://\n\n# connect to a sqlserver database using Windows domain authentication\n$ runas /user:ACME\\wiley /netonly \"usql mssql://host/dbname/\"\n\n# connect to a oracle database\n$ usql or://user:pass@host/sid\n$ usql oracle://user:pass@host:port/sid\n$ usql or://\n\n# connect to a cassandra database\n$ usql ca://user:pass@host/keyspace\n$ usql cassandra://host/keyspace\n$ usql cql://host/\n$ usql ca://\n\n# connect to a sqlite database that exists on disk\n$ usql dbname.sqlite3\n\n# Note: when connecting to a SQLite database, if the \"driver://\" or\n# \"driver:\" scheme/alias is omitted, the file must already exist on disk.\n#\n# if the file does not yet exist, the URL must incorporate file:, sq:, sqlite3:,\n# or any other recognized sqlite3 driver alias to force usql to create a new,\n# empty database at the specified path:\n$ usql sq://path/to/dbname.sqlite3\n$ usql sqlite3://path/to/dbname.sqlite3\n$ usql file:/path/to/dbname.sqlite3\n\n# connect to a adodb ole resource (windows only)\n$ usql adodb://Microsoft.Jet.OLEDB.4.0/myfile.mdb\n$ usql \"adodb://Microsoft.ACE.OLEDB.12.0/?Extended+Properties=\\\"Text;HDR=NO;FMT=Delimited\\\"\"\n\n# connect to a named connection in $HOME/.config/usql/config.yaml\n$ cat $HOME/.config/usql/config.yaml\nconnections:\n  my_named_connection: sqlserver://user:pass@localhost/\n$ usql my_named_connection\n\n# connect with ODBC driver (requires building with odbc tag)\n$ cat /etc/odbcinst.ini\n[DB2]\nDescription=DB2 driver\nDriver=/opt/db2/clidriver/lib/libdb2.so\nFileUsage = 1\nDontDLClose = 1\n\n[PostgreSQL ANSI]\nDescription=PostgreSQL ODBC driver (ANSI version)\nDriver=psqlodbca.so\nSetup=libodbcpsqlS.so\nDebug=0\nCommLog=1\nUsageCount=1\n\n# connect to db2, postgres databases using odbc config above\n$ usql odbc+DB2://user:pass@localhost/dbname\n$ usql odbc+PostgreSQL+ANSI://user:pass@localhost/dbname?TraceFile=/path/to/trace.log\n```\n\nSee the [section on connection variables][connection-vars] for information on\ndefining connection names.\n\n### Executing Queries and Commands\n\nThe interactive interpreter reads queries and [backslash meta (`\\`) commands][commands],\nsending the query to the connected database:\n\n```sh\n$ usql sqlite://example.sqlite3\nConnected with driver sqlite3 (SQLite3 3.17.0)\nType \"help\" for help.\n\nsq:example.sqlite3=\u003e create table test (test_id int, name string);\nCREATE TABLE\nsq:example.sqlite3=\u003e insert into test (test_id, name) values (1, 'hello');\nINSERT 1\nsq:example.sqlite3=\u003e select * from test;\n  test_id | name\n+---------+-------+\n        1 | hello\n(1 rows)\n\nsq:example.sqlite3=\u003e select * from test\nsq:example.sqlite3-\u003e \\p\nselect * from test\nsq:example.sqlite3-\u003e \\g\n  test_id | name\n+---------+-------+\n        1 | hello\n(1 rows)\n\nsq:example.sqlite3=\u003e \\c postgres://booktest@localhost\nerror: pq: 28P01: password authentication failed for user \"booktest\"\nEnter password:\nConnected with driver postgres (PostgreSQL 9.6.6)\npg:booktest@localhost=\u003e select * from authors;\n  author_id |      name\n+-----------+----------------+\n          1 | Unknown Master\n          2 | blah\n          3 | foobar\n(3 rows)\n\npg:booktest@localhost=\u003e\n```\n\nCommands may accept one or more parameter, and can be quoted using either `'`\nor `\"`. Command parameters [may also be backticked][backticks].\n\n### Backslash Commands\n\n`usql` supports interleaved backslash (`\\`) meta commands to modify or alter\nthe way that `usql` interprets queries, formats its output, and changes the\nresulting interactive flow.\n\n```sh\n(not connected)=\u003e \\c postgres://user:pass@localhost\npg:user@localhost=\u003e select * from my_table \\G\n```\n\nAvailable backslash meta commands can be displayed with `\\?`:\n\n```sh\n$ usql\nType \"help\" for help.\n\n(not connected)=\u003e \\?\nGeneral\n  \\q                                quit usql\n  \\quit                             alias for \\q\n  \\copyright                        show usage and distribution terms for usql\n  \\drivers                          show database drivers available to usql\n\nHelp\n  \\? [commands]                     show help on usql's meta (backslash) commands\n  \\? options                        show help on usql command-line options\n  \\? variables                      show help on special usql variables\n\nConnection\n  \\c DSN or \\c NAME                 connect to dsn or named database connection\n  \\c DRIVER PARAMS...               connect to database with driver and parameters\n  \\connect                          alias for \\c\n  \\Z                                close (disconnect) database connection\n  \\disconnect                       alias for \\Z\n  \\password [USER]                  change password for user\n  \\passwd                           alias for \\password\n  \\conninfo                         display information about the current database connection\n\nQuery Execute\n  \\g [(OPTIONS)] [FILE] or ;        execute query (and send results to file or |pipe)\n  \\go                               alias for \\g\n  \\G [(OPTIONS)] [FILE]             as \\g, but forces vertical output mode\n  \\ego                              alias for \\G\n  \\gx [(OPTIONS)] [FILE]            as \\g, but forces expanded output mode\n  \\gexec                            execute query and execute each value of the result\n  \\gset [PREFIX]                    execute query and store results in usql variables\n  \\bind [PARAM]...                  set query parameters\n  \\timing [on|off]                  toggle timing of commands\n\nQuery View\n  \\crosstab [(OPTIONS)] [COLUMNS]   execute query and display results in crosstab\n  \\crosstabview                     alias for \\crosstab\n  \\xtab                             alias for \\crosstab\n  \\chart CHART [(OPTIONS)]          execute query and display results as a chart\n  \\watch [(OPTIONS)] [INTERVAL]     execute query every specified interval\n\nQuery Buffer\n  \\e [-raw|-exec] [FILE] [LINE]     edit the query buffer, raw (non-interpolated) buffer, the\n                                    exec buffer, or a file with external editor\n  \\edit                             alias for \\e\n  \\p [-raw|-exec]                   show the contents of the query buffer, the raw\n                                    (non-interpolated) buffer or the exec buffer\n  \\print                            alias for \\p\n  \\raw                              alias for \\p\n  \\exec                             alias for \\p\n  \\w [-raw|-exec] FILE              write the contents of the query buffer, raw\n                                    (non-interpolated) buffer, or exec buffer to file\n  \\write                            alias for \\w\n  \\r                                reset (clear) the query buffer\n  \\reset                            alias for \\r\n\nInformational\n  \\d[S+] [NAME]                     list tables, views, and sequences or describe table, view,\n                                    sequence, or index\n  \\da[S+] [PATTERN]                 list aggregates\n  \\df[S+] [PATTERN]                 list functions\n  \\di[S+] [PATTERN]                 list indexes\n  \\dm[S+] [PATTERN]                 list materialized views\n  \\dn[S+] [PATTERN]                 list schemas\n  \\dp[S] [PATTERN]                  list table, view, and sequence access privileges\n  \\ds[S+] [PATTERN]                 list sequences\n  \\dt[S+] [PATTERN]                 list tables\n  \\dv[S+] [PATTERN]                 list views\n  \\l[+]                             list databases\n  \\ss[+] [TABLE|QUERY] [k]          show stats for a table or a query\n\nVariables\n  \\set [NAME [VALUE]]               set usql application variable, or show all usql application\n                                    variables if no parameters\n  \\unset NAME                       unset (delete) usql application variable\n  \\pset [NAME [VALUE]]              set table print formatting option, or show all print\n                                    formatting options if no parameters\n  \\a                                toggle between unaligned and aligned output mode\n  \\C [TITLE]                        set table title, or unset if none\n  \\f [SEPARATOR]                    show or set field separator for unaligned query output\n  \\H                                toggle HTML output mode\n  \\T [ATTRIBUTES]                   set HTML \u003ctable\u003e tag attributes, or unset if none\n  \\t [on|off]                       show only rows\n  \\x [on|off|auto]                  toggle expanded output\n  \\cset [NAME [URL]]                set named connection, or show all named connections if no\n                                    parameters\n  \\cset NAME DRIVER PARAMS...       set named connection for driver and parameters\n  \\prompt [-TYPE] VAR [PROMPT]      prompt user to set application variable\n\nInput/Output\n  \\echo [-n] [MESSAGE]...           write message to standard output (-n for no newline)\n  \\qecho [-n] [MESSAGE]...          write message to \\o output stream (-n for no newline)\n  \\warn [-n] [MESSAGE]...           write message to standard error (-n for no newline)\n  \\o [FILE]                         send all query results to file or |pipe\n  \\out                              alias for \\o\n  \\copy SRC DST QUERY TABLE         copy results of query from source database into table on\n                                    destination database\n  \\copy SRC DST QUERY TABLE(A,...)  copy results of query from source database into table's\n                                    columns on destination database\n\nControl/Conditional\n  \\i FILE                           execute commands from file\n  \\include                          alias for \\i\n  \\ir FILE                          as \\i, but relative to location of current script\n  \\include_relative                 alias for \\ir\n  \\if EXPR                          begin conditional block\n  \\elif EXPR                        alternative within current conditional block\n  \\else                             final alternative within current conditional block\n  \\endif                            end conditional block\n\nTransaction\n  \\begin [-read-only [ISOLATION]]   begin transaction, with optional isolation level\n  \\commit                           commit current transaction\n  \\rollback                         rollback (abort) current transaction\n  \\abort                            alias for \\rollback\n\nOperating System/Environment\n  \\! [COMMAND]                      execute command in shell or start interactive shell\n  \\cd [DIR]                         change the current working directory\n  \\getenv VARNAME ENVVAR            fetch environment variable\n  \\setenv NAME [VALUE]              set or unset environment variable\n```\n\nParameters passed to commands [can be backticked][backticks].\n\n## Features and Compatibility\n\nAn overview of `usql`'s features, functionality, and compatibility with `psql`:\n\n- [Configuration][config]\n- [Variables][variables]\n- [Backticks][backticks]\n- [Copying Between Databases][copying]\n- [Syntax Highlighting][highlighting]\n- [Time Formatting][timefmt]\n- [Context Completion][completion]\n- [Host Connection Information](#host-connection-information)\n- [Passwords][usqlpass]\n- [Runtime Configuration (RC) File][usqlrc]\n\nThe `usql` project's goal is to support as much of `psql`'s core features and\nfunctionality, and aims to be as compatible as possible - [contributions are\nalways appreciated][contributing]!\n\n#### Configuration\n\nDuring its initialization phase, `usql` reads a standard [YAML configuration][yaml]\nfile [`config.yaml`](contrib/config.yaml). On Windows this is `%AppData%/usql/config.yaml`,\non macOS this is `$HOME/Library/Application Support/usql/config.yaml`, and on\nLinux and other Unix systems this is normally `$HOME/.config/usql/config.yaml`.\n\n##### `connections:`\n\n[Named connection DSNs][connecting] can be defined under `connections:` as a string\nor as a map:\n\n```yaml\nconnections:\n  my_couchbase_conn: couchbase://Administrator:P4ssw0rd@localhost\n  my_clickhouse_conn: clickhouse://clickhouse:P4ssw0rd@localhost\n  my_godror_conn:\n    protocol: godror\n    username: system\n    password: P4ssw0rd\n    hostname: localhost\n    port: 1521\n    database: free\n```\n\nDefined `connections:` can be used on the command-line with `\\connect`, `\\c`,\n`\\copy`, and [other commands][commands]:\n\n```sh\n$ usql my_godror_conn\nConnected with driver godror (Oracle Database 23.0.0.0.0)\nType \"help\" for help.\n\ngr:system@localhost/free=\u003e\n```\n\n##### `init:`\n\nAn initialization script can be defined as `init:` as a string:\n\n```yaml\ninit: |\n  \\echo welcome to the jungle `date`\n  \\set SYNTAX_HL_STYLE paraiso-dark\n  \\set PROMPT1 '\\033[32m%S%M%/%R%#\\033[0m '\n```\n\nThe `init:` script is commonly used to set [environment variables][variables]\nor other configuration, and can be disabled on the command-line using the\n`--no-init` / `-X` flag. The script will be executed prior to any `-c` /\n`--command` / `-f` / `--file` flag and before starting the interactive\ninterpreter.\n\n##### Other Options\n\nPlease see [`contrib/config.yaml`](contrib/config.yaml) for an overview of\navailable configuration options.\n\n#### Variables\n\n`usql` supports [runtime][runtime-vars], [connection][connection-vars], and\n[display formatting][print-vars] variables that can be `\\set`, `\\cset`, or\n`\\pset` respectively.\n\n##### Runtime Variables\n\nRuntime variables are managed with the `\\set` and `\\unset` [commands][commands]:\n\n```sh\n(not connected)=\u003e \\unset FOO\n(not connected)=\u003e \\set FOO bar\n```\n\nRuntime variables can be displayed with `\\set`:\n\n```sh\n(not connected)=\u003e \\set\nFOO = 'bar'\n```\n\n###### Variable Interpolation\n\nWhen a runtime variable `NAME` has been `\\set`, then `:NAME`, `:'NAME'`, and\n`:\"NAME\"` will be interpolated into the query buffer:\n\n```sh\npg:booktest@localhost=\u003e \\set FOO bar\npg:booktest@localhost=\u003e select * from authors where name = :'FOO';\n  author_id | name\n+-----------+------+\n          7 | bar\n(1 rows)\n```\n\nWhere a runtime variable is used as `:'NAME'` or `:\"NAME\"` the interpolated\nvalue will be quoted using `'` or `\"` respectively:\n\n```sh\npg:booktest@localhost=\u003e \\set TBLNAME authors\npg:booktest@localhost=\u003e \\set COLNAME name\npg:booktest@localhost=\u003e \\set FOO bar\npg:booktest@localhost=\u003e select * from :TBLNAME where :\"COLNAME\" = :'FOO'\n```\n\nThe query buffer and interpolated values can be displayed with `\\p` and\n`\\print`, or the raw query buffer can be displayed with `\\raw`:\n\n```sh\npg:booktest@localhost-\u003e \\p\nselect * from authors where \"name\" = 'bar'\npg:booktest@localhost-\u003e \\raw\nselect * from :TBLNAME where :\"COLNAME\" = :'FOO'\n```\n\n\u003chr/\u003e\n\n\u003e **Note**\n\u003e\n\u003e Variables contained within other strings \u003cb\u003e\u003cu\u003ewill not\u003c/b\u003e\u003c/u\u003e be interpolated:\n\n```sh\npg:booktest@localhost=\u003e select ':FOO';\n  ?column?\n+----------+\n  :FOO\n(1 rows)\n\npg:booktest@localhost=\u003e \\p\nselect ':FOO';\n```\n\n\u003chr/\u003e\n\n##### Connection Variables\n\nConnection variables work similarly to runtime variables, and are managed with\n`\\cset`. Connection variables can be used with the `\\c`, `\\connect`, `\\copy`,\nor [other commands][commands]:\n\n```sh\n(not connected)=\u003e \\cset my_conn postgres://user:pass@localhost\n(not connected)=\u003e \\c my_conn\nConnected with driver postgres (PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2))\npg:postgres@localhost=\u003e\n```\n\nConnection variables are not interpolated into queries. See the [configuration\nsection for information on defining persistent connection variables][config].\n\nConnection variables can be displayed with `\\cset`:\n\n```sh\n(not connected)=\u003e \\cset\nmy_conn = 'postgres://user:pass@localhost'\n```\n\n##### Display Formatting (Print) Variables\n\nDisplay formatting variables can be set using `\\pset` and [other\ncommands][commands]:\n\n```sh\n(not connected)=\u003e \\pset time Kitchen\nTime display is \"Kitchen\" (\"3:04PM\").\n(not connected)=\u003e \\a\nOutput format is unaligned.\n```\n\nDisplay formatting variables can be displayed with `\\pset`:\n\n```sh\n(not connected)=\u003e \\pset\ntime                     Kitchen\n```\n\n##### Other Variables\n\nRuntime behavior, such as [enabling or disabling syntax\nhighlighting][highlighting] can be modified through special variables like\n[`SYNTAX_HL`][highlighting].\n\nUse the `\\? variables` [command][commands] to display variable help information\nand to list special variables recognized by `usql`:\n\n```sh\n(not connected)=\u003e \\? variables\n```\n\n#### Backticks\n\n[Backslash (`\\`) meta commands][commands] support backticks on parameters:\n\n```sh\n(not connected)=\u003e \\echo Welcome `echo $USER` -- 'currently:' \"(\" `date` \")\"\nWelcome ken -- currently: ( Wed Jun 13 12:10:27 WIB 2018 )\n(not connected)=\u003e\n```\n\nBackticked parameters will be passed to the user's `SHELL`, exactly as written,\nand can be combined with `\\set`:\n\n```sh\npg:booktest@localhost=\u003e \\set MYVAR `date`\npg:booktest@localhost=\u003e \\set\nMYVAR = 'Wed Jun 13 12:17:11 WIB 2018'\npg:booktest@localhost=\u003e \\echo :MYVAR\nWed Jun 13 12:17:11 WIB 2018\npg:booktest@localhost=\u003e\n```\n\n#### Copying Between Databases\n\n`usql` provides a `\\copy` command that reads data from a source database DSN\nand writes to a destination database DSN:\n\n```sh\n(not connected)=\u003e \\cset PGDSN postgres://user:pass@localhost\n(not connected)=\u003e \\cset MYDSN mysql://user:pass@localhost\n(not connected)=\u003e \\copy PGDSN MYDSN 'select book_id, author_id from books' 'books(id, author_id)'\n```\n\nAs demonstrated above, the `\\copy` command does not require being connected to\na database, and will not modify or change the current open database connection\nor state.\n\nAny valid URL or DSN name maybe used for the source and destination database:\n\n```sh\n(not connected)=\u003e \\cset MYDSN mysql://user:pass@localhost\n(not connected)=\u003e \\copy postgres://user:pass@localhost MYDSN 'select book_id, author_id from books' 'books(id, author_id)'\n```\n\n\u003chr/\u003e\n\n\u003e **Note**\n\u003e\n\u003e `usql`'s `\\copy` is distinct from and \u003cb\u003e\u003cu\u003edoes not\u003c/u\u003e\u003c/b\u003e function like\n\u003e `psql`'s `\\copy`.\n\n\u003chr/\u003e\n\n##### Copy Parameters\n\nThe `\\copy` command has two parameter forms:\n\n```txt\n\\copy SRC DST QUERY TABLE\n\\copy SRC DST QUERY TABLE(COL1, COL2, ..., COLN)\n```\n\nWhere:\n\n- `SRC` - is the [source database URL][connecting] to connect to, and where the\n  `QUERY` will be executed\n- `DST` - is the [destination database URL][connecting] to connect to, and where\n  the destination `TABLE` resides\n- `QUERY` - is the query to execute on the `SRC` connection, the results of which\n  will be copied to `TABLE`\n- `TABLE` - is the destination table name, followed by an optional SQL-like column\n  list of the form `(COL1, COL2, ..., COLN)`\n- `(COL1, COL2, ..., COLN)` - a list of the destination column names, 1-to-N\n\nThe usual rules for [variables, interpolation, and quoting][variables] apply to\n`\\copy`'s parameters.\n\n###### Quoting\n\n`QUERY` and `TABLE` **_must_** be quoted when containing spaces:\n\n```sh\n$ usql\n(not connected)=\u003e echo :SOURCE_DSN :DESTINATION_DSN\npg://postgres:P4ssw0rd@localhost/ mysql://localhost\n(not connected)=\u003e \\copy :SOURCE_DSN :DESTINATION_DSN 'select * from mySourceTable' 'myDestination(colA, colB)'\nCOPY 2\n```\n\n###### Column Counts\n\nThe `QUERY` **_must_** return the same number of columns as defined by\nthe `TABLE` expression:\n\n```sh\n$ usql\n(not connected)=\u003e \\copy csvq:. sq:test.db 'select * from authors' authors\nerror: failed to prepare insert query: 2 values for 1 columns\n(not connected)=\u003e \\copy csvq:. sq:test.db 'select name from authors' authors(name)\nCOPY 2\n```\n\n###### Datatype Compatibility and Casting\n\nThe `\\copy` command does not attempt to perform any kind of datatype\nconversion.\n\nIf a `QUERY` returns columns with different datatypes than expected by the\n`TABLE`'s column, the `QUERY` can use the source database's conversion/casting\nfunctionality to cast columns to a datatype that will work for `TABLE`'s\ncolumns:\n\n```sh\n$ usql\n(not connected)=\u003e \\copy postgres://user:pass@localhost mysql://user:pass@localhost 'SELECT uuid_column::TEXT FROM myPgTable' myMyTable\nCOPY 1\n```\n\n###### Importing Data from CSV\n\nThe `\\copy` command is capable of importing data from CSV's (or any other\ndatabase!) using the `csvq` driver:\n\n```sh\n$ cat authors.csv\nauthor_id,name\n1,Isaac Asimov\n2,Stephen King\n$ cat books.csv\nbook_id,author_id,title\n1,1,I Robot\n2,2,Carrie\n3,2,Cujo\n$ usql\n(not connected)=\u003e -- setting variables to make connections easier\n(not connected)=\u003e \\set SOURCE_DSN csvq://.\n(not connected)=\u003e \\set DESTINATION_DSN sqlite3:booktest.db\n(not connected)=\u003e -- connecting to the destination and creating the schema\n(not connected)=\u003e \\c :DESTINATION_DSN\nConnected with driver sqlite3 (SQLite3 3.38.5)\n(sq:booktest.db)=\u003e create table authors (author_id integer, name text);\nCREATE TABLE\n(sq:booktest.db)=\u003e create table books (book_id integer not null primary key autoincrement, author_id integer, title text);\nCREATE TABLE\n(sq:booktest.db)=\u003e -- adding an extra row to books prior to copying\n(sq:booktest.db)=\u003e insert into books (author_id, title) values (1, 'Foundation');\nINSERT 1\n(sq:booktest.db)=\u003e -- disconnecting to demonstrate that \\copy opens new database connections\n(sq:booktest.db)=\u003e \\disconnect\n(not connected)=\u003e -- copying data from SOURCE -\u003e DESTINATION\n(not connected)=\u003e \\copy :SOURCE_DSN :DESTINATION_DSN 'select * from authors' authors\nCOPY 2\n(not connected)=\u003e \\copy :SOURCE_DSN :DESTINATION_DSN 'select author_id, title from books' 'books(author_id, title)'\nCOPY 3\n(not connected)=\u003e \\c :DESTINATION_DSN\nConnected with driver sqlite3 (SQLite3 3.38.5)\n(sq:booktest.db)=\u003e select * from authors;\n author_id |     name\n-----------+--------------\n         1 | Isaac Asimov\n         2 | Stephen King\n(2 rows)\n\nsq:booktest.db=\u003e select * from books;\n book_id | author_id |   title\n---------+-----------+------------\n       1 |         1 | Foundation\n       2 |         1 | I Robot\n       3 |         2 | Carrie\n       4 |         2 | Cujo\n(4 rows)\n```\n\n\u003chr/\u003e\n\n\u003e **Note**\n\u003e\n\u003e When importing large datasets (\u003e 1GiB) from one database to another, it is\n\u003e better to use a database's native clients and tools.\n\n\u003chr/\u003e\n\n###### Reusing Connections with Copy\n\nThe `\\copy` command (and all `usql` commands) [works with variables][variables].\nWhen scripting, or when needing to perform multiple `\\copy` operations from/to\nmultiple sources/destinations, the best practice is to `\\set` connection\nvariables either in a script or in [the `$HOME/.usqlrc` RC script][usqlrc].\n\nSimilarly, passwords can be stored for easy reuse (and kept out of scripts) by\nstoring in [the `$HOME/.usqlpass` password file][usqlpass].\n\nFor example:\n\n```sh\n$ cat $HOME/.usqlpass\npostgres:*:*:*:postgres:P4ssw0rd\ngodror:*:*:*:system:P4ssw0rd\n$ usql\nType \"help\" for help.\n\n(not connected)=\u003e \\set pglocal postgres://postgres@localhost:49153?sslmode=disable\n(not connected)=\u003e \\set orlocal godror://system@localhost:1521/orasid\n(not connected)=\u003e \\copy :pglocal :orlocal 'select staff_id, first_name from staff' 'staff(staff_id, first_name)'\nCOPY 18\n```\n\n#### Syntax Highlighting\n\nInteractive queries will be syntax highlighted by default, using\n[Chroma][chroma]. There are a number of [variables][] that control syntax\nhighlighting:\n\n| Variable                | Default                         | Values            | Description                                                  |\n| ----------------------- | ------------------------------- | ----------------- | ------------------------------------------------------------ |\n| `SYNTAX_HL`             | `true`                          | `true` or `false` | enables syntax highlighting                                  |\n| `SYNTAX_HL_FORMAT`      | _dependent on terminal support_ | formatter name    | [Chroma formatter name][chroma-formatter]                    |\n| `SYNTAX_HL_OVERRIDE_BG` | `true`                          | `true` or `false` | enables overriding the background color of the chroma styles |\n| `SYNTAX_HL_STYLE`       | `monokai`                       | style name        | [Chroma style name][chroma-style]                            |\n\nThe `SYNTAX_*` variables are regular `usql` variables, and can be `\\set` and\n`\\unset`:\n\n```sh\n$ usql\n(not connected)=\u003e \\set SYNTAX_HL_STYLE dracula\n(not connected)=\u003e \\unset SYNTAX_HL_OVERRIDE_BG\n```\n\n#### Context Completion\n\nWhen using the interactive shell, context completion is available in `usql` by\nhitting the `\u003cTab\u003e` key. For example, hitting `\u003cTab\u003e` can complete some parts\nof `SELECT` queries on a PostgreSQL databases:\n\n```sh\n$ usql\nConnected with driver postgres (PostgreSQL 14.4 (Debian 14.4-1.pgdg110+1))\nType \"help\" for help.\n\npg:postgres@=\u003e select * f\u003cTab\u003e\nfetch            from             full outer join\n```\n\nOr, for example completing [backslash commands][commands] while connected to a\ndatabase:\n\n```sh\n$ usql my://\nConnected with driver mysql (10.8.3-MariaDB-1:10.8.3+maria~jammy)\nType \"help\" for help.\n\nmy:root@=\u003e \\g\u003cTab\u003e\n\\g     \\gexec \\gset  \\gx\n```\n\nNot all commands, contexts, or databases support completion. If you're\ninterested in helping to make `usql`'s completion better, see [the section\nbelow on contributing][contributing].\n\nCommand completion can be canceled with `\u003cControl-C\u003e`.\n\n#### Time Formatting\n\nSome databases support time/date columns that [support formatting][go-time]. By\ndefault, `usql` formats time/date columns as [RFC3339Nano][go-time], and can be\nset using `\\pset time FORMAT`:\n\n```sh\n$ usql pg://\nConnected with driver postgres (PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1))\nType \"help\" for help.\n\npg:postgres@=\u003e \\pset\ntime                     RFC3339Nano\npg:postgres@=\u003e select now();\n             now\n-----------------------------\n 2021-05-01T22:21:44.710385Z\n(1 row)\n\npg:postgres@=\u003e \\pset time Kitchen\nTime display is \"Kitchen\" (\"3:04PM\").\npg:postgres@=\u003e select now();\n   now\n---------\n 10:22PM\n(1 row)\n\npg:postgres@=\u003e\n```\n\n`usql`'s time format supports any [Go supported time format][go-time], or can\nbe any standard Go const name, such as `Kitchen` above. See below for an\noverview of the [available time constants](#time-constants).\n\n##### Time Constants\n\nThe following are the time constant names available in `usql`, corresponding\ntime format value, and example display output:\n\n| Constant    |                                Format |        Display \u003csup\u003e[↓][f-ts]\u003c/sup\u003e |\n| ----------- | ------------------------------------: | ----------------------------------: |\n| ANSIC       |            `Mon Jan _2 15:04:05 2006` |          `Wed Aug  3 20:12:48 2022` |\n| UnixDate    |        `Mon Jan _2 15:04:05 MST 2006` |      `Wed Aug  3 20:12:48 UTC 2022` |\n| RubyDate    |      `Mon Jan 02 15:04:05 -0700 2006` |    `Wed Aug 03 20:12:48 +0000 2022` |\n| RFC822      |                 `02 Jan 06 15:04 MST` |               `03 Aug 22 20:12 UTC` |\n| RFC822Z     |               `02 Jan 06 15:04 -0700` |             `03 Aug 22 20:12 +0000` |\n| RFC850      |      `Monday, 02-Jan-06 15:04:05 MST` | `Wednesday, 03-Aug-22 20:12:48 UTC` |\n| RFC1123     |       `Mon, 02 Jan 2006 15:04:05 MST` |     `Wed, 03 Aug 2022 20:12:48 UTC` |\n| RFC1123Z    |     `Mon, 02 Jan 2006 15:04:05 -0700` |   `Wed, 03 Aug 2022 20:12:48 +0000` |\n| RFC3339     |           `2006-01-02T15:04:05Z07:00` |              `2022-08-03T20:12:48Z` |\n| RFC3339Nano | `2006-01-02T15:04:05.999999999Z07:00` |       `2022-08-03T20:12:48.693257Z` |\n| Kitchen     |                              `3:04PM` |                            `8:12PM` |\n| Stamp       |                     `Jan _2 15:04:05` |                   `Aug  3 20:12:48` |\n| StampMilli  |                 `Jan _2 15:04:05.000` |               `Aug  3 20:12:48.693` |\n| StampMicro  |              `Jan _2 15:04:05.000000` |            `Aug  3 20:12:48.693257` |\n| StampNano   |           `Jan _2 15:04:05.000000000` |         `Aug  3 20:12:48.693257000` |\n\n[f-ts]: #f-ts \"Timestamp Value\"\n\n\u003cp\u003e\n  \u003ci\u003e\n    \u003ca id=\"f-ts\"\u003e\u003csup\u003e↓\u003c/sup\u003e Generated using timestamp \u003ccode\u003e2022-08-03T20:12:48.693257Z\u003c/code\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003c/i\u003e\n\u003c/p\u003e\n\n#### Host Connection Information\n\nBy default, `usql` displays connection information when connecting to a\ndatabase. This might cause problems with some databases or connections. This\ncan be disabled by setting the system environment variable `USQL_SHOW_HOST_INFORMATION`\nto `false`:\n\n```sh\n$ export USQL_SHOW_HOST_INFORMATION=false\n$ usql pg://booktest@localhost\nType \"help\" for help.\n\npg:booktest@=\u003e\n```\n\n`SHOW_HOST_INFORMATION` is a standard [`usql` variable][variables],\nand can be `\\set` or `\\unset`. Additionally, it can be passed via the\ncommand-line using `-v` or `--set`:\n\n```sh\n$ usql --set SHOW_HOST_INFORMATION=false pg://\nType \"help\" for help.\n\npg:booktest@=\u003e \\set SHOW_HOST_INFORMATION true\npg:booktest@=\u003e \\connect pg://\nConnected with driver postgres (PostgreSQL 9.6.9)\npg:booktest@=\u003e\n```\n\n#### Terminal Graphics\n\n`usql` supports terminal graphics for [Kitty][kitty-graphics], [iTerm][iterm-graphics],\nand [Sixel][sixel-graphics] enabled terminals using the [`github.com/kenshaw/rasterm` package][rasterm].\nTerminal graphics are only available when using the interactive shell.\n\n##### Detection and Support\n\n`usql` will attempt to detect when terminal graphics support is available using\nthe `USQL_TERM_GRAPHICS`, `TERM_GRAPHICS` and other environment variables\nunique to various terminals.\n\nWhen support is available, the logo will be displayed at the start of an\ninteractive session:\n\n\u003cdiv style=\"padding-left: 20px;\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/xo/usql-logo/master/usql-interactive.png\" height=\"120\"\u003e\n\u003c/div\u003e\n\n##### Charts and Graphs\n\nThe [`\\chart` command][chart-command] can be used to display a chart\ndirectly in the terminal:\n\n\u003cdiv style=\"padding-left: 20px;\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/xo/usql-logo/master/chart-example.png\" height=\"120\"\u003e\n\u003c/div\u003e\n\nSee [the section on the `\\chart` meta command][chart-command] for details.\n\n##### Enabling/Disabling Terminal Graphics\n\nTerminal graphics can be forced enabled or disabled by setting the\n`USQL_TERM_GRAPHICS` or the `TERM_GRAPHICS` environment variable:\n\n```sh\n# disable\n$ USQL_TERM_GRAPHICS=none usql\n\n# force iterm graphics\n$ TERM_GRAPHICS=iterm usql\n```\n\n| Variable        | Default | Values                                | Description                    |\n| --------------- | ------- | ------------------------------------- | ------------------------------ |\n| `TERM_GRAPHICS` | ``      | ``, `kitty`, `iterm`, `sixel`, `none` | enables/disables term graphics |\n\n##### Terminals with Graphics Support\n\nThe following terminals have been tested with `usql`:\n\n- [WezTerm][wezterm] is a cross-platform terminal for Windows, macOS, Linux, and\n  many other platforms that supports [iTerm][iterm-graphics] graphics\n\n- [iTerm2][iterm2] is a macOS terminal that supports [iTerm][iterm-graphics]\n  graphics\n\n- [kitty][kitty] is a terminal for Linux, macOS, and various BSDs that supports\n  [Kitty][kitty-graphics] graphics\n\n- [foot][foot] is a Wayland terminal for Linux (and other Wayland hosts) that\n  supports [Sixel][sixel-graphics] graphics\n\nAdditional terminals that support [Sixel][sixel-graphics] graphics are\ncatalogued on the [Are We Sixel Yet?][arewesixelyet] website.\n\n#### Passwords\n\n`usql` supports reading passwords for databases from a `.usqlpass` file\ncontained in the user's `HOME` directory at startup:\n\n```sh\n$ cat $HOME/.usqlpass\n# format is:\n# protocol:host:port:dbname:user:pass\npostgres:*:*:*:booktest:booktest\n$ usql pg://\nConnected with driver postgres (PostgreSQL 9.6.9)\nType \"help\" for help.\n\npg:booktest@=\u003e\n```\n\nWhile the `.usqlpass` functionality will not be removed, it is recommended to\n[define named connections][connection-vars] preferably via [the `config.yaml`\nfile][config].\n\n\u003chr/\u003e\n\n\u003e **Note**\n\u003e\n\u003e The `.usqlpass` file cannot be readable by other users, and the permissions\n\u003e should be set accordingly:\n\n```sh\nchmod 0600 ~/.usqlpass\n```\n\n\u003chr/\u003e\n\n#### Runtime Configuration (RC) File\n\n`usql` supports executing a `.usqlrc` runtime configuration (RC) file contained\nin the user's `HOME` directory:\n\n```sh\n$ cat $HOME/.usqlrc\n\\echo WELCOME TO THE JUNGLE `date`\n\\set SYNTAX_HL_STYLE paraiso-dark\n\n-- set color prompt (default is prompt is \"%S%m%/%R%#\" )\n\\set PROMPT1 \"\\033[32m%S%m%/%R%#\\033[0m\"\n$ usql\nWELCOME TO THE JUNGLE Thu Jun 14 02:36:53 WIB 2018\nType \"help\" for help.\n\n(not connected)=\u003e \\set\nSYNTAX_HL_STYLE = 'paraiso-dark'\n(not connected)=\u003e\n```\n\nThe `.usqlrc` file is read at startup in the same way as a file passed on the\ncommand-line with `-f` / `--file`. It is commonly used to set startup\nenvironment variables and settings.\n\nRC-file execution can be temporarily disabled at startup by passing `-X` or\n`--no-init` on the command-line:\n\n```sh\n$ usql --no-init pg://\n```\n\nWhile the `.usqlrc` functionality will not be removed, it is recommended to set\nan `init` script in [the `config.yaml` file][config].\n\n## Additional Notes\n\nThe following are additional notes and miscellania related to `usql`:\n\n### Release Builds\n\n[Release builds][releases] are built with the `most` build tag and with\nadditional [SQLite3 build tags (see: `build.sh`)](build.sh).\n\n### macOS\n\nThe recommended installation method on macOS is [via `brew`][via Homebrew] due\nto the way library dependencies for the `sqlite3` driver are done on macOS. If\nthe following (or similar) error is encountered when attempting to run `usql`:\n\n```sh\n$ usql\ndyld: Library not loaded: /usr/local/opt/icu4c/lib/libicuuc.68.dylib\n  Referenced from: /Users/user/.local/bin/usql\n  Reason: image not found\nAbort trap: 6\n```\n\nThen missing library dependency can be fixed by installing\n[`icu4c`](http://site.icu-project.org) using `brew`:\n\n```sh\n$ brew install icu4c\nRunning `brew update --auto-update`...\n==\u003e Downloading ...\n...\n\n$ usql\n(not connected)=\u003e\n```\n\n## Contributing\n\n`usql` is currently a WIP, and is aiming towards a 1.0 release soon.\nWell-written PRs are always welcome -- and there is a clear backlog of issues\nmarked `help wanted` on the GitHub issue tracker! For [technical details on\ncontributing, see CONTRIBUTING.md](CONTRIBUTING.md).\n\n[_Pick up an issue today, and submit a PR tomorrow!_][help-wanted]\n\n## Related Projects\n\n- [dburl][dburl] - Go package providing a standard, URL-style mechanism for parsing\n  and opening database connection URLs\n- [xo][xo] - Go command-line tool to generate Go code from a database schema\n\n[dburl]: https://github.com/xo/dburl\n[dburl-schemes]: https://github.com/xo/dburl#protocol-schemes-and-aliases\n[go-time]: https://pkg.go.dev/time#pkg-constants\n[go-sql]: https://pkg.go.dev/database/sql\n[homebrew]: https://brew.sh/\n[xo]: https://github.com/xo/xo\n[xo-tap]: https://github.com/xo/homebrew-xo\n[chroma]: https://github.com/alecthomas/chroma\n[chroma-formatter]: https://github.com/alecthomas/chroma#formatters\n[chroma-style]: https://xyproto.github.io/splash/docs/all.html\n[help-wanted]: https://github.com/xo/usql/issues?q=is:open+is:issue+label:%22help+wanted%22\n[aur]: https://aur.archlinux.org/packages/usql\n[yay]: https://github.com/Jguer/yay\n[arch-makepkg]: https://wiki.archlinux.org/title/makepkg\n[backticks]: #backticks \"Backticks\"\n[config]: #configuration \"Configuration\"\n[commands]: #backslash-commands \"Backslash Commands\"\n[completion]: #context-completion \"Context Completion\"\n[connecting]: #connecting-to-databases \"Connecting to Databases\"\n[contributing]: #contributing \"Contributing\"\n[copying]: #copying-between-databases \"Copying Between Databases\"\n[highlighting]: #syntax-highlighting \"Syntax Highlighting\"\n[termgraphics]: #terminal-graphics \"Terminal Graphics\"\n[timefmt]: #time-formatting \"Time Formatting\"\n[usqlpass]: #passwords \"Passwords\"\n[usqlrc]: #runtime-configuration-rc-file \"Runtime Configuration File\"\n[variables]: #variables \"Variables\"\n[runtime-vars]: #runtime-variables \"Runtime Variables\"\n[connection-vars]: #connection-variables \"Connection Variables\"\n[print-vars]: #display-formatting-(print)-variables \"Display Formatting (print) Variables\"\n[kitty-graphics]: https://sw.kovidgoyal.net/kitty/graphics-protocol.html\n[iterm-graphics]: https://iterm2.com/documentation-images.html\n[sixel-graphics]: https://saitoha.github.io/libsixel/\n[rasterm]: https://github.com/kenshaw/rasterm\n[wezterm]: https://wezfurlong.org/wezterm/\n[iterm2]: https://iterm2.com\n[foot]: https://codeberg.org/dnkl/foot\n[kitty]: https://sw.kovidgoyal.net/kitty/\n[arewesixelyet]: https://www.arewesixelyet.com\n[chart-command]: #chart-command \"\\\\chart meta command\"\n[yaml]: https://yaml.org\n","funding_links":[],"categories":["Popular","Command-Line Productivity","Go","Development","开源类库","Misc","Database","CLI","Utilities","Open source library","\\*nix/\\*nux","Tools","Go (531)","其他__大数据","golang","Programming Languages","sqlite","Repositories","CLI Utilities","\u003ca name=\"data-management-tabular\"\u003e\u003c/a\u003eData management - Tabular data","\u003ca name=\"Go\"\u003e\u003c/a\u003eGo","Utility"],"sub_categories":["Database","数据库","Fail injection","Databases","网络服务_其他","Go","Utility/Miscellaneous","Datbase to Struct"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxo%2Fusql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxo%2Fusql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxo%2Fusql/lists"}