{"id":13862792,"url":"https://github.com/kostafey/ejc-sql","last_synced_at":"2025-06-25T23:07:06.009Z","repository":{"id":5945112,"uuid":"7165811","full_name":"kostafey/ejc-sql","owner":"kostafey","description":"Emacs SQL client uses Clojure JDBC.","archived":false,"fork":false,"pushed_at":"2024-11-11T01:20:19.000Z","size":797,"stargazers_count":285,"open_issues_count":34,"forks_count":31,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-22T23:32:07.002Z","etag":null,"topics":["clojure","clomacs","emacs","jdbc","sql"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kostafey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2012-12-14T13:23:38.000Z","updated_at":"2024-11-22T21:32:21.000Z","dependencies_parsed_at":"2024-08-05T06:05:52.247Z","dependency_job_id":"cf32ae9c-26d6-45f2-b9a2-ad78d06bc0fd","html_url":"https://github.com/kostafey/ejc-sql","commit_stats":{"total_commits":534,"total_committers":21,"mean_commits":"25.428571428571427","dds":0.09737827715355807,"last_synced_commit":"29308faad38e9cabd98fb5a8450df15db1e4a4cb"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kostafey/ejc-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostafey%2Fejc-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostafey%2Fejc-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostafey%2Fejc-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostafey%2Fejc-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostafey","download_url":"https://codeload.github.com/kostafey/ejc-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostafey%2Fejc-sql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261967132,"owners_count":23237663,"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":["clojure","clomacs","emacs","jdbc","sql"],"created_at":"2024-08-05T06:01:52.660Z","updated_at":"2025-06-25T23:07:05.985Z","avatar_url":"https://github.com/kostafey.png","language":"Emacs Lisp","readme":"[![Emacs](https://img.shields.io/badge/Emacs-27-8e44bd.svg)](https://www.gnu.org/software/emacs/)\n[![License GPL 2](https://img.shields.io/badge/license-GPL_2-green.svg)](http://www.gnu.org/licenses/gpl-2.0.txt)\n[![MELPA](https://melpa.org/packages/ejc-sql-badge.svg)](https://melpa.org/#/ejc-sql)\n[![Melpa Stable](https://stable.melpa.org/packages/ejc-sql-badge.svg)](https://stable.melpa.org/#/ejc-sql)\n[![Build Status](https://github.com/kostafey/ejc-sql/workflows/CI/badge.svg)](https://github.com/kostafey/ejc-sql/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/kostafey/ejc-sql/badge.svg?branch=master)](https://coveralls.io/github/kostafey/ejc-sql?branch=master)\n\n# ejc-sql\n\n\u003cimg src=\"https://gitlab.com/kostafey/ejc-sql/-/raw/master/img/ejc-sql-logo.png\" width=\"220px\"\n alt=\"ejc-sql logo\" align=\"right\" /\u003e\n\nejc-sql turns Emacs into a simple SQL client; it uses a JDBC connection to\ndatabases via [clojure/java.jdbc](https://github.com/clojure/java.jdbc) lib.\n\nYou can use multiple connections at the same time. Autocompletion and basic\nformatting of SQL scripts are also available.\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n  - [Set httpd port](#set-httpd-port)\n  - [Autocomplete](#autocomplete)\n  - [Fuzzy matching](#fuzzy-matching)\n  - [Company mode](#company-mode)\n  - [Minibuffer completion](#minibuffer-completion)\n  - [ElDoc](#eldoc)\n  - [Performance \u0026 output customization](#performance-output-customization)\n  - [Create connections interactively](#create-connections-interactively)\n  - [Create connections manualy](#create-connections-manualy)\n    - [Install JDBC drivers](#install-jdbc-drivers)\n    - [MySQL connection](#mysqlconnection)\n    - [MariaDB connection](#mariadbconnection)\n    - [MS SQL Server connection](#mssqlserverconnection)\n    - [Oracle connection](#oracleconnection)\n    - [H2 connection](#h2connection)\n    - [SQLite connection](#sqliteconnection)\n    - [PostgreSQL connection](#postgresqlconnection)\n    - [Informix connection](#informixconnection)\n    - [Presto connection](#prestoconnection)\n    - [ClickHouse connection](#clickhouseconnection)\n    - [ElasticSearch connection](#elasticsearchconnection)\n    - [Snowflake connection](#snowflakeconnection)\n- [Usage](#usage)\n  - [Basic use case](#basic-use-case)\n  - [Separators \u0026 delimiters](#separators-delimiters)\n  - [Use with org-mode](#use-with-org-mode)\n  - [Use existing nREPL](#use-existing-nrepl)\n    - [Dedicated ejc-sql nREPL](#dedicated-nrepl)\n    - [Different project nREPL](#different-nrepl)\n  - [Goto definition \u0026 results ring](#goto-definition-results-ring)\n- [List of keybindings \u0026 functions](#keybindings)\n- [Yasnippet](#yasnippet)\n- [Troubleshooting](#troubleshooting)\n- [Requirements](#requirements)\n- [License](#license)\n\n![ejc-screenshot](https://user-images.githubusercontent.com/1282079/73614659-476e7b80-4612-11ea-8681-1c37bda9422e.png)\n\n## Installation\n\n1. To run Clojure, install [Leiningen](http://leiningen.org) (assuming you have\n   already installed Java 7+).\n\n2. Add [MELPA](https://github.com/melpa/melpa#usage) (if not yet present) to your\n   `package-archives` list.\n\n   Then you can install ejc-sql with the following command:\n\n   \u003ckbd\u003eM-x package-install [RET] ejc-sql [RET]\u003c/kbd\u003e\n\n## Configuration\n\nHere is an full-fledged real-world `ejc-sql` configuration example:\n[ejc-sql-conf](https://github.com/kostafey/kostafeys-emacs-confik/blob/master/custom/ejc-sql-conf.el).\n\nFirst, load `ejc-sql` package:\n```lisp\n(require 'ejc-sql)\n```\n\n## Set httpd port\n\nTo achieve async SQL queries evaluation, both Emacs and JVM side is an HTTP\nclient and HTTP server. Emacs as HTTP client via CIDER pass a SQL query to JVM\nand don't expect any data response from the database. The JVM part prints the\nresult dataset to the file (in pain text table format). Then JVM as HTTP client\nnotifies Emacs: \"data printed into `filepath`, please refresh the output\nbuffer\". The JVM side port can be configured by related CIDER customizations,\nwhereas the default Emacs side HTTP server port can be customized by\n`clomacs-httpd-default-port` variable (`8080` by default):\n```lisp\n(setq clomacs-httpd-default-port 8090) ; Use a port other than 8080.\n```\n\n### Autocomplete\n\nInstall `auto-complete` e.g. by the following command:\n\u003ckbd\u003eM-x package-install [RET] auto-complete [RET]\u003c/kbd\u003e\nEnable autocomplete for `ejc-sql` minor mode:\n```lisp\n(require 'ejc-autocomplete)\n(add-hook 'ejc-sql-minor-mode-hook\n          (lambda ()\n            (auto-complete-mode t)\n            (ejc-ac-setup)))\n```\n\nAutocompletion is available for the following databases:\n\n* Oracle\n* MS SQL Server\n* PostgreSQL\n* MySQL\n* Informix\n* H2\n* SQLite\n\nAutocompletion data is stored in the database structure cache. This cache is\nlocated on Clojure side, so it's global: the same database structure information\nis shared between different buffers connected to the same database. An attempt\nto autocomplete requires data from cache or lanches a thread aimed to create\nit. If Clojure side has the database structure cache, autocompletion variants\nare returned immediately. If not, the database structure cache creation process\nstarts. It's async, so the process of Emacs is not blocked, and the user can\nmove the point (cursor), edit SQL, and so on. If the user waits for\nautocompletion and doesn't move point (cursor) during this process, he will get\nautocompletion variants. In order to checkout the current database connection\ncache run `ejc-print-cache`.\n\nAny successfully executed DDL query (`CREATE`, `ALTER`, `DROP`, `RENAME`) clears\ncurrent connection cache, so next autocompletion attempt will recreate it.\nTo clean the current  connection cache manually, you can run\n`ejc-invalidate-cache`.\n\n\u003ca id=\"fuzzy-matching\"\u003e\u003c/a\u003e\n### Fuzzy matching\n\nNon-nil `ejc-use-flx` enables `flx` fuzzy matching engine for autocompletion.\n[flx-ido](https://github.com/lewang/flx) is required in this case, it can\nbe installed by your favorite approach. E.g. by `MEPLA`:\n\u003ckbd\u003eM-x package-install [RET] flx-ido [RET]\u003c/kbd\u003e\n\n```lisp\n(setq ejc-use-flx t)\n```\n\nTo customize the minimum number of typed chars use `flx` for autocompletion,\n2 by default:\n\n```lisp\n(setq ejc-flx-threshold 2)\n```\n\n\u003ca id=\"company-mode\"\u003e\u003c/a\u003e\n### Company mode\n\nInstall `company-mode` e.g. by the following command:\n\u003ckbd\u003eM-x package-install [RET] company [RET]\u003c/kbd\u003e\nEnable `company-mode` completion frontend for `ejc-sql` minor mode:\n\n```lisp\n(require 'ejc-company)\n(push 'ejc-company-backend company-backends)\n(add-hook 'ejc-sql-minor-mode-hook\n          (lambda ()\n            (company-mode t)))\n```\n\nIf you want to automatically start completion after inserting a dot for\n`company-mode` despite `company-minimum-prefix-length` is bigger than `0`,\nset `ejc-complete-on-dot` to `t`:\n\n```elisp\n(setq ejc-complete-on-dot t)\n```\n\nTo show documentation quickhelp install `company-quickhelp` by:\n\u003ckbd\u003eM-x package-install [RET] company-quickhelp [RET]\u003c/kbd\u003e\n\nTo activate `company-quickhelp` add the following to your `.emacs`:\n\n```lisp\n(company-quickhelp-mode)\n```\n\n\u003ca id=\"minibuffer-completion\"\u003e\u003c/a\u003e\n### Minibuffer completion\n\nBy default standard `completing-read` is used as minibuffer the completion\nsystem. This is allow you to use it with any configured\ncompletion mechanism for example, [vertico](https://github.com/minad/vertico),\n[ivy](https://github.com/abo-abo/swiper)\nor [helm](https://github.com/emacs-helm/helm).\nYou can change this to `ido-completing-read`\n([ido](https://www.gnu.org/software/emacs/manual/html_mono/ido.html))\nby editing `ejc-completion-system` and selecting `ido`:\n\n```elisp\n(setq ejc-completion-system 'ido)\n```\n\n### ElDoc\n\nEnable ElDoc for `ejc-sql` minor mode:\n```lisp\n(add-hook 'ejc-sql-minor-mode-hook\n          (lambda ()\n            (ejc-eldoc-setup)))\n```\n\nElDoc for functions and procedures is available for the following databases:\n\n* Oracle\n* PostgreSQL\n* MySQL\n\n\u003ca id=\"performance-output-customization\"\u003e\u003c/a\u003e\n### Performance \u0026 output customization\n\n`ejc-set-fetch-size` sets limit for the number of records to output (`50` by\ndefault). Set to `nil` if you want to disable this limit.\n\n`ejc-set-max-rows` sets the limit for the number of records to contain in\nResultSet (`99` by default). Set to `nil` if you want to disable this limit, or\nyou can set it the same value as `ejc-set-fetch-size` to increase select query\nexecution performance.\n\nAny time your ResultSet is bigger than `ejc-set-fetch-size` you will receive\nmessages like `\"Too many rows. Only 50 from 99+ are shown.\"`. To inhibit this\nmessages you can set `ejc-set-show-too-many-rows-message` to `nil` (`t` by\ndefault).\n\n`ejc-set-column-width-limit` sets limit for outputing the number of chars per\ncolumn (`30` by default). The rest will be replaced by `...`. Set to\n`nil` if you want to disable this limit. This setting is applied to the text\nrepresentation of any field type, but it is especially useful for `varchar` and\n`CLOB` fields.\n\n`ejc-set-use-unicode` sets using unicode for grid borders, e.g. use `─┼─`\ninstead of `-+-` (`nil` by default).\n\nAll these functions change Clojure variables, so if you want to change\ndefaults, to avoid Clojure nREPL autolaunch on Emacs start, you should add\nthem to the `ejc-sql-connected-hook` in your `.emacs`, e.g.:\n```lisp\n(add-hook 'ejc-sql-connected-hook\n          (lambda ()\n            (ejc-set-fetch-size 50)\n            (ejc-set-max-rows 50)\n            (ejc-set-show-too-many-rows-message t)\n            (ejc-set-column-width-limit 25)\n            (ejc-set-use-unicode t)))\n```\n\nCurrent result set table minor-mode is `orgtbl-mode`. This mode provides some\nfunctionality for post-processing and browsing the query results.\n```lisp\n(setq ejc-result-table-impl 'orgtbl-mode)\n```\nAlternatively, you can use a simple and bare result set mode to maximize the\nbuffer performance by setting `ejc-result-table-impl` to `'ejc-result-mode`.\n\nIf you want to see the full text of some field (e.g. the full text of `CLOB`\nfield) despite `ejc-set-column-width-limit`, and your `ejc-result-table-impl`\nis `'ejc-result-mode` you can select a single-record result set\n(e.g. `SELECT * FROM table WHERE id = 1`).\n\nIf you want to see the full text of some field with newlines in case of\nmultiline fields, you should select single-record and single-column result set\n(e.g. `SELECT field FROM table WHERE id = 1`). So, you will get a field value\n**as-is** despite `ejc-set-column-width-limit` and `ejc-result-table-impl`.\n\nTo illustrate the description above here are some output examples of query\nresults that depend on configuration.\n\nAssume you have the following database (this example uses MySQL):\n\n```sql\nCREATE TABLE product (\n  id    INT UNSIGNED  NOT NULL AUTO_INCREMENT PRIMARY KEY,\n  name  VARCHAR(30)   NOT NULL,\n  quantity INT,\n  price DECIMAL(7,2),\n  description VARCHAR(255)\n);\nINSERT INTO product (name, price, quantity, description)\nVALUES ('socks', 1.25, 10, CONCAT('A sock is an item of clothing worn\\n',\n                                  'on the feet and often covering the\\n',\n                                  'ankle or some part of the calf.\\n',\n                                  'Some type of shoe or boot is\\n',\n                                  'typically worn over socks.'));\nINSERT INTO product (name, price, quantity, description)\nVALUES ('sweater', 14.56, 5, CONCAT('A sweater, also called a jumper\\n'\n                                    'in British English, is a piece\\n'\n                                    'of clothing, typically with long\\n'\n                                    'sleeves, made of knitted or\\n'\n                                    'crocheted material that covers\\n'\n                                    'the upper part of the body.'));\n```\n**output examples for** `orgtbl-mode` (by default):\n```sql\nSELECT * FROM product\n```\n```\n| id | name    | quantity | price | description                    |\n|----+---------+----------+-------+--------------------------------|\n|  1 | socks   |       10 |  1.25 | A sock is an item of clothi... |\n|  2 | sweater |        5 | 14.56 | A sweater, also called a ju... |\n```\n```sql\nSELECT * FROM product WHERE id = 1\n```\n```\n| id | name  | quantity | price | description                    |\n|----+-------+----------+-------+--------------------------------|\n|  1 | socks |       10 |  1.25 | A sock is an item of clothi... |\n```\n```sql\nSELECT description FROM product WHERE id = 1\n```\n```\n| description                        |\n|------------------------------------|\n| A sock is an item of clothing worn |\n| on the feet and often covering the |\n| ankle or some part of the calf.    |\n| Some type of shoe or boot is       |\n| typically worn over socks.         |\n```\n**output examples for** `ejc-result-mode`:\n```sql\nSELECT * FROM product\n```\n```\nid | name    | quantity | price | description\n---+---------+----------+-------+-------------------------------\n1  | socks   | 10       | 1.25  | A sock is an item of clothi...\n2  | sweater | 5        | 14.56 | A sweater, also called a ju...\n```\n```sql\nSELECT * FROM product WHERE id = 1\n```\n```\nid          | 1\nname        | socks\nquantity    | 10\nprice       | 1.25\ndescription | A sock is an item of clothing worn on the feet and often covering the ankle or some part of the calf. Some type of shoe or boot is typically worn over socks.\n```\n```sql\nSELECT description FROM product WHERE id = 1\n```\n```\ndescription\n----------------------------------\nA sock is an item of clothing worn\non the feet and often covering the\nankle or some part of the calf.\nSome type of shoe or boot is\ntypically worn over socks.\n```\n\n\u003ca id=\"create-connections-interactively\"\u003e\u003c/a\u003e\n## Create connections interactively\n\nThe easiest way to create connections configuration is to use interactive\nconnections creation.\n\nIn any `sql-mode` buffer run (\u003ckbd\u003eC-c ei\u003c/kbd\u003e):\n\n```\nM-x ejc-connect-interactive \u003cRET\u003e\n```\n\nThen follow the creation steps: type your connection name, choose\ndatabase type, host (or file path depends on selected database type), port,\nuser name and password.\n\n`ejc-sql` uses [Aether](https://github.com/cemerick/pomegranate) API of\nMaven-resolver to automatically resolve and download the required JDBC\ndriver (if not yet) for selected database type.\n\nYou can customize artifacts and their versions used as JDBC drivers for each\ndatabase type in Leiningen format in `ejc-jdbc-drivers` custom variable.\n\nAfter you type all required data a and new connection will be created, it\nwill attempt to immediately connect `current-buffer` to this connection.\nThen you can use this connection name to connect from different buffers.\nType (\u003ckbd\u003eC-c ec\u003c/kbd\u003e):\n```\nM-x ejc-connect \u003cRET\u003e your-connection-name \u003cRET\u003e\n```\n\nThis connection will be available during the current Emacs session. To keep\nit between Emacs restarts, you can open your `.emacs` file or any file,\nloaded as Emacs configuration, locate point (cursor) somewhere after\n`(require 'ejc-sql)` expression and run:\n```\nM-x ejc-insert-connection-data \u003cRET\u003e your-connection-name \u003cRET\u003e\n```\n\nThis function inserts `ejc-create-connection` expression the same as you can\naccomplish via manual connection creation.\n\n\u003ca id=\"create-connections-manualy\"\u003e\u003c/a\u003e\n## Create connections manualy\n\n\u003ca id=\"install-jdbc-drivers\"\u003e\u003c/a\u003e\n### Install JDBC drivers\n\nIn most cases, you don't need to install JDBC drivers manually.\nSimply put, you can set a parameter `:dependencies` in `ejc-create-connection`\nfunction as a vector of the required artifacts in Leiningen format.\nIn this case, `ejc-sql` will resolve, download (if not yet) all\nrequired jar dependencies via [Aether](https://github.com/cemerick/pomegranate)\nand load them to `CLASSPATH` during the `ejc-connect` function run. E.g.:\n\n```lisp\n(ejc-create-connection\n \"Informix-db-connection\"\n :dependencies [[com.ibm.informix/jdbc \"4.50.3\"]]\n ...\n )\n```\n\nAlternatively, you can pass the exact JDBC driver jar file in the\n`:classpath` parameter of `ejc-create-connection` function. E.g.:\n\n```lisp\n(ejc-create-connection\n \"Informix-db-connection\"\n :classpath (concat \"~/.m2/repository/com/ibm/informix/jdbc/4.50.3/\"\n                    \"jdbc-4.50.3.jar\")\n ...\n )\n```\n\n`ejc-sql` will try to resolve all required dependencies if this JBDC driver\nrequires some dependencies itself anyway. But you can pass all requred\ndependencies manually as a vector of jar files paths. E.g.:\n\n```lisp\n(ejc-create-connection\n \"Informix-db-connection\"\n :classpath (vector\n              (concat \"~/.m2/repository/org/mongodb/bson/3.8.0/\"\n                      \"bson-3.8.0.jar\")\n              (concat \"~/.m2/repository/com/ibm/informix/jdbc/4.50.3/\"\n                      \"jdbc-4.50.3.jar\"))\n ...\n )\n```\n\nThe rest of this section describes how to download and install JDBC drivers\nmanually. If you are familiar with JDBC, please omit it.\n\nThe most common way is to install JDBC drivers to your `~/.m2` directory.\nHere is a list of such installation examples. Anyway, __it will become outdated\nsoon__, so please consult Google to install your database JDBC driver.\n\nFirst of all, install [Maven](https://maven.apache.org/), then you can install\nyour JDBC driver with one of the following commands.\n\n**Oracle**\n\nDownload JDBC driver manually from\n[oracle.com](http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html)\n\nFix your actual JDBC version number `-Dversion`, filepath `-Dfile` and run\ncommand like this:\n```\nmvn install:install-file -Dfile=\"~/downloads/ojdbc7.jar\" -DgroupId=com.oracle.jdbc -DartifactId=ojdbc7 -Dversion=12.1.0.2 -Dpackaging=jar -DgeneratePom=true\n```\n\n**MS SQL Server**\n\nDownload JDBC driver manually from\n[microsoft.com](https://social.msdn.microsoft.com/search/en-US?query=sql%20server%20jdbc)\n\nFix your actual JDBC version number `-Dversion`, filepath `-Dfile` and run\ncommand like this:\n```\nmvn install:install-file -Dfile=\"~/downloads/sqljdbc.jar\" -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc -Dversion=6.0 -Dpackaging=jar -DgeneratePom=true\n```\nor from Maven Central:\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=com.microsoft.sqlserver:mssql-jdbc:6.2.2.jre8\n```\n\n**JTDS**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=net.sourceforge.jtds:jtds:1.3.1\n```\n\n**PostgreSQL**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=org.postgresql:postgresql:42.6.0\n```\n\n**MySQL**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=mysql:mysql-connector-java:5.1.6\n```\n\n**MariaDB**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=org.mariadb.jdbc:mariadb-java-client:1.1.7\n```\n\n**H2**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=com.h2database:h2:1.4.192\n```\n\n**SQLite**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=org.xerial:sqlite-jdbc:3.8.11.2\n```\n\n**Informix**\n```\nmvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=com.ibm.informix:jdbc:4.50.3\n```\n\nSetup connections with `ejc-create-connection` function in your `.emacs`.\nIt's first arg is your custom database connection name, the remaining args\nare the same as database connection structure of\n[clojure/java.jdbc](https://github.com/clojure/java.jdbc) lib.\n\nThe configuration of `ejs-sql` might looks like this:\n\n```lisp\n;; Create your JDBC database connections configuration:\n```\n\n\u003ca id=\"mysqlconnection\"\u003e\u003c/a\u003e\n### MySQL connection\n```lisp\n;; MySQL example\n(ejc-create-connection\n \"MySQL-db-connection\"\n :classpath (concat \"~/.m2/repository/mysql/mysql-connector-java/5.1.6/\"\n                     \"mysql-connector-java-5.1.6.jar\")\n :subprotocol \"mysql\"\n :subname \"//localhost:3306/my_db_name\"\n :user \"a_user\"\n :password \"secret\")\n```\n\nIf you want to see MySQL-specific keywords in autocompletion\nlist, please provide access to `mysql.help_keyword` table\nfor your user, e.g.:\n```sql\nGRANT SELECT ON mysql.help_keyword TO a_user;\n```\n\n\u003ca id=\"mariadbconnection\"\u003e\u003c/a\u003e\n### MariaDB connection\n```lisp\n;; MariaDB example\n(ejc-create-connection\n \"MariaDB-db-connection\"\n :dependencies [[org.mariadb.jdbc/mariadb-java-client \"2.6.0\"]]\n :classname \"org.mariadb.jdbc.Driver\"\n :connection-uri \"jdbc:mariadb://localhost:3306/db_name\"\n :user \"a_user\"\n :password \"secret\")\n```\n\n\u003ca id=\"mssqlserverconnection\"\u003e\u003c/a\u003e\n### MS SQL Server connection\n```lisp\n;; MS SQL Server example\n(ejc-create-connection\n \"MS-SQL-db-connection\"\n :classpath (concat \"~/.m2/repository/com/microsoft\"\n                     \"/sqlserver/sqljdbc/4.2/sqljdbc-4.2.jar\")\n :subprotocol \"sqlserver\"\n :subname \"//localhost:1433\"\n :user \"a_user\"\n :password \"secret\"\n :database \"my_db_name\")\n\n;; MS SQL Server example (via URI)\n(ejc-create-connection\n \"MS-SQL-db-connection-uri\"\n :classpath (concat \"~/.m2/repository/com/microsoft\"\n                     \"/sqlserver/sqljdbc/4.2/sqljdbc-4.2.jar\")\n :connection-uri (concat \"jdbc:sqlserver://localhost\\\\\\\\instance:1433;\"\n                         \"databaseName=my_db_name;\"\n                         \"user=a_user;\"\n                         \"password=secret;\"))\n\n;; MS SQL Server example (via JTDS)\n(ejc-create-connection\n \"MS-SQL-db-connection-JTDS\"\n :classpath (concat \"~/.m2/repository/net/sourceforge/jtds\"\n                     \"/jtds/1.3.1/jtds-1.3.1.jar\")\n :connection-uri (concat \"jdbc:jtds:sqlserver://localhost:1433/dbname;\"\n                         \"instance=instance;\"\n                         \"user=a_user;\"\n                         \"password=secret;\"))\n```\n\n\u003ca id=\"oracleconnection\"\u003e\u003c/a\u003e\n### Oracle connection\n```lisp\n;; Oracle example (via Service Name)\n(ejc-create-connection\n \"Oracle-db-connection-sname\"\n :classpath (concat \"~/.m2/repository/com/oracle/jdbc\"\n                    \"/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.jar\")\n :dbtype \"oracle\"\n :dbname \"my_service_name\"\n :host \"localhost\"\n :port \"1521\"\n :user \"a_user\"\n :password \"secret\"\n :separator \"/\")\n\n;; Oracle example (via SID)\n(ejc-create-connection\n \"Oracle-db-connection-sid\"\n :classpath (concat \"~/.m2/repository/com/oracle/jdbc\"\n                     \"/ojdbc7/12.1.0.2/ojdbc7-12.1.0.2.jar\")\n :dbtype \"oracle:sid\"\n :dbname \"my_sid_name\"\n :host \"localhost\"\n :port \"1521\"\n :user \"a_user\"\n :password \"secret\"\n :separator \"/\")\n\n;; Oracle example (via URI)\n(ejc-create-connection\n \"Oracle-db-connection-uri\"\n :classpath (concat \"~/.m2/repository/com/oracle/jdbc\"\n                     \"/ojdbc7/12.1.0.2/ojdbc7-12.1.0.2.jar\")\n :connection-uri \"jdbc:oracle:thin:@localhist:1521:dbname\"\n :user \"a_user\"\n :password \"secret\"\n :separator \"/\")\n```\n\n\u003ca id=\"h2connection\"\u003e\u003c/a\u003e\n### H2 connection\n```lisp\n;; H2 example\n(ejc-create-connection\n \"H2-db-connection\"\n :classpath (file-truename\n             \"~/.m2/repository/com/h2database/h2/1.4.191/h2-1.4.191.jar\")\n :subprotocol \"h2\"\n :subname \"file://~/projects/my_proj/db/database;AUTO_SERVER=TRUE\"\n :user \"a_user\"\n :password \"secret\")\n\n;; H2 remote example\n;; run on remote server first:\n;; java -jar ~/.m2/repository/com/h2database/h2/1.4.192/h2-1.4.192.jar -tcpAllowOthers\n(ejc-create-connection\n \"H2-remote-db-connection\"\n :classpath \"~/.m2/repository/com/h2database/h2/1.4.192/h2-1.4.192.jar\"\n :connection-uri (concat \"jdbc:h2:tcp://192.168.0.1:9092/~/db/database;ifexists=true;\"\n                         \"user=a_user;\"\n                         \"password=secret;\"))\n```\n\n\u003ca id=\"sqliteconnection\"\u003e\u003c/a\u003e\n### SQLite connection\n```lisp\n;; SQLite example\n(ejc-create-connection\n \"SQLite-conn\"\n :classpath (concat \"~/.m2/repository/org/xerial/sqlite-jdbc/\"\n                    \"3.23.1/sqlite-jdbc-3.23.1.jar\")\n :subprotocol \"sqlite\"\n ;; Use absolute path, e.g.:\n ;;   \"file:///home/user/projects/my_proj/db/sqdb.db\"\n ;;   \"/home/user/projects/my_proj/db/sqdb.db\"\n ;;   \"file:///C:/Projects/my_proj/db/sqdb.db\"\n ;;   \"C:/Projects/my_proj/db/sqdb.db\"\n ;; or expand it by file-truename (not applicable for Windows paths):\n :subname (concat \"file://\"\n                  (file-truename \"~/projects/my_proj/db/sqdb.db\")))\n```\n\n\u003ca id=\"postgresqlconnection\"\u003e\u003c/a\u003e\n### PostgreSQL connection\n```lisp\n;; PostgreSQL example\n(ejc-create-connection\n \"PostgreSQL-db-connection\"\n :classpath (concat \"~/.m2/repository/org.postgresql/postgresql/42.6.0/\"\n                    \"postgresql-42.6.0.jar\")\n :subprotocol \"postgresql\"\n :subname \"//localhost:5432/my_db_name\"\n :user \"a_user\"\n :password \"secret\")\n```\n\n\u003ca id=\"informixconnection\"\u003e\u003c/a\u003e\n### Informix connection\n```lisp\n;; Informix example\n(ejc-create-connection\n \"Informix-db-connection\"\n :dependencies [[com.ibm.informix/jdbc \"4.50.3\"]]\n :classname \"com.informix.jdbc.IfxDriver\"\n :connection-uri (concat\n                  ;; In the case of IPv6, ::1 should be used\n                  ;; as the host instead of localhost.\n                  \"jdbc:informix-sqli://localhost:8201/test:\"\n                  \"INFORMIXSERVER=myserver;\"\n                  \"user=a_user;\"\n                  \"password=secret;\"))\n\n```\n\n\u003ca id=\"prestoconnection\"\u003e\u003c/a\u003e\n### Presto connection\n```lisp\n;; Presto example\n(ejc-create-connection\n \"Presto-db-connection\"\n :subprotocol \"presto\"\n :dependencies [[com.facebook.presto/presto-jdbc \"0.232\"]]\n :connection-uri (concat\n                  \"jdbc:presto://localhost:1234/dbName/schemaName?\"\n                  \"user=a_user\"))\n```\n\n\u003ca id=\"clickhouseconnection\"\u003e\u003c/a\u003e\n### ClickHouse connection\n```lisp\n;; ClickHouse example\n(ejc-create-connection\n  \"ch@180\"\n  :dependencies [[com.clickhouse/clickhouse-jdbc \"0.3.2\"]]\n  :dbtype \"clickhouse\"\n  :classname \"com.clickhouse.jdbc.ClickHouseDriver\"\n  :connection-uri (concat \"jdbc:clickhouse://10.1.4.180:8123/\" \"testdb\"))\n```\n\n\u003ca id=\"elasticsearchconnection\"\u003e\u003c/a\u003e\n### ElasticSearch connection\n```lisp\n;; ElasticSearch example\n(ejc-create-connection\n  \"es@177\"\n  :dependencies [[org.elasticsearch.plugin/x-pack-sql-jdbc \"7.9.1\"]]\n  :dbtype \"elasticsearch\"\n  :classname \"org.elasticsearch.xpack.sql.jdbc.EsDriver\"\n  :connection-uri (concat \"jdbc:es://172.16.13.177:9200/\"))\n```\n\n\u003ca id=\"snowflakeconnection\"\u003e\u003c/a\u003e\n### Snowflake connection\n```lisp\n(ejc-create-connection\n \"snowflake\"\n :dependencies [[net.snowflake/snowflake-jdbc \"3.13.27\"]\n                [net.java.dev.jna/jna \"5.13.0\"]]\n :connection-uri (concat \"jdbc:snowflake://my-db.snowflakecomputing.com:443\"\n                         \"?user=\"my-email@myjob.com\"\n                         \"\u0026warehouse=my-warehouse\"\n                         \"\u0026role=my-role\"\n                         \"\u0026db=my-db\"\n                         \"\u0026authenticator=externalbrowser\"\n                         \"\u0026JDBC_QUERY_RESULT_FORMAT=JSON\"))\n```\n\n## Usage\n\n\u003ca id=\"basic-use-case\"\u003e\u003c/a\u003e\n### Basic use case\n\nFirst of all, open your SQL source file (or any `sql-mode` buffer).\n\nOn the other hand, there is a handy function to create temporary `sql-mode`\nbuffers for playing with SQL: `ejc-get-temp-editor-buffer`.\nIf you bind it, e.g. to:\n```lisp\n(global-set-key (kbd \"C-c eb\") 'ejc-get-temp-editor-buffer)\n```\nthen, when you press \u003ckbd\u003eC-c eb\u003c/kbd\u003e, `*ejc-sql-editor*` buffer will be\ncreated; when you press \u003ckbd\u003eM-1 C-c eb\u003c/kbd\u003e, `*ejc-sql-editor-1*` buffer will\ncreated and so on. This buffers can be saved as ordinary file buffers by\n`save-buffer` command to the appropriate files, located in\n`ejc-temp-editor-file-path` directory (\"~/tmp/ejc-sql/\" by default).\n\nIn any selected SQL buffer connect to your database:\n```\nM-x ejc-connect \u003cRET\u003e MySQL-db-connection \u003cRET\u003e\n```\nand wait until \"Connected.\" message appears. This will add connection\ninformation to buffer local variables. Furthermore, if there is no `ejc-sql`\ndedicated Clojure REPL running, it will start it.\n\nSince connection information is **`buffer-local`**, you should run `ejc-connect`\nfor any new buffer. Any of `ejc-sql-mode` buffers can keep connection\ninformation to different databases and database types. But they use the same\n`ejc-sql` dedicated Clojure REPL to interact with databases via JDBC.\n\nThen type your queries like this:\n\n```SQL\nselect something from my_table\n```\nand press \u003ckbd\u003eC-c C-c\u003c/kbd\u003e to run it.\n\nHave much fun!\n\n\u003ca id=\"separators-delimiters\"\u003e\u003c/a\u003e\n### Separators \u0026 delimiters\n\nUse `/` char to separate expressions to evaluate (actually `\\n/`), e.g.:\n```SQL\nselect something from my_table\n/\nselect other from other_table\n```\nSo, you don't need to select SQL snippet, simply put point (cursor) into code\nsnippet and press \u003ckbd\u003eC-c C-c\u003c/kbd\u003e (or desired keybinding). Borders of SQL\nwill be found by Emacs buffer begin/end or this `/` separator.\n\nIt's possible to pass multiple statements, you can use `;` delimiter to separate\nthem:\n```SQL\ninsert into my_table (product, price) values ('socks', 1.25);\ninsert into my_table (product, price) values ('sweater', 14.56);\ninsert into my_table (product, price) values ('jeans', 25.30);\n/\nselect * from my_table\n```\nHere, the first part is a single SQL snippet passed to `ejc-sql` backend but\nevaluated by 3 independent SQL statements (transactions). The output will looks\nlike this:\n```\nRecords affected: 1\nRecords affected: 1\nRecords affected: 1\n```\n\nFurthermore, you can change the delimiter inside SQL snippet. E.g. in this\nMySQL snippet `;` replaced by `$$` as transaction delimiter:\n```SQL\nDELIMITER $$\nCREATE PROCEDURE GetAllProducts()\nBEGIN\n  SELECT * FROM products;\nEND $$\n/\nCALL GetAllProducts();\n```\n\nSince `;` symbols can be used very often as part of procedure syntax\n(e.g. in Oracle), you can disable splitting SQL code snippet to the sequence of\nseparate transactions by setting `:separator` in DB connection configuration\n(see https://github.com/kostafey/ejc-sql#oracle-connection).\n\n\u003ca id=\"use-with-org-mode\"\u003e\u003c/a\u003e\n### Use with org-mode\n\nYou can run `M-x ejc-connect \u003cRET\u003e my-db-connection \u003cRET\u003e` in `org-mode`\nbuffers. In this case, `major-mode` will persists as `org-mode`, but all\nconnection-related data will be added to the buffer.\n\n```markdown\n* Create DB\n** Product table\n*** Create\n#+begin_src sql\nCREATE TABLE product (\n  id    INT UNSIGNED  NOT NULL AUTO_INCREMENT,\n  name  VARCHAR(30)   NOT NULL,\n  price DECIMAL(7,2)\n);\n#+end_src\n\n*** Fill\n#+begin_src sql\nINSERT INTO product (name, price) VALUES ('socks', 1.25);\nINSERT INTO product (name, price) VALUES ('sweater', 14.56);\nINSERT INTO product (name, price) VALUES ('jeans', 25.30);\n#+end_src\n\n*** Select\n#+begin_src sql\nSELECT * FROM product;\n/\nSELECT * FROM product WHERE name = 'jeans';\n#+end_src\n\n#+RESULTS:\n: id | name    | price\n: ---+---------+------\n: 1  | socks   | 1.25\n: 2  | sweater | 14.56\n: 3  | jeans   | 25.30\n```\n\nPlace point (cursor) into code snippet and run SQL statements via\n\u003ckbd\u003eC-c C-c\u003c/kbd\u003e as always. For `org-mode` buffers code snippets borders\nconsidered as batch of SQL statement(s) boundaries.\nFurthermore, you can use `ejc-sql-separator` (`/` by default) to divide\nbatch of SQL statement(s) inside code block as in `sql-mode` buffers.\n\nThe SQL query evaluation result will be added to this `org-mode` buffer in\n`#+RESULTS:` section - an expected behaviour for `org-mode` users by default\n(see example above).\n\nTo avoid this behaviour and get results in popup window - as `ejc-sql` users\nexpected, add to your `.emacs`:\n\n```lisp\n(setq ejc-org-mode-show-results nil)\n```\n\nIf your `org-mode` buffer connected via `ejc-connect`, any time you run\n\u003ckbd\u003eC-c '\u003c/kbd\u003e (`org-edit-special`) for code snippets, you will get new\nbuffer with this minor-mode (`ejc-sql-mode`) and all connection-related data.\nSo, you can operate inside it like in ordinary `sql-mode` buffer, which is\nalready connected to the database.\n\nYou can use both `ejc-sql` and `org-mode` original `org-babel` execution\nengine simultaneously in one buffer.\n\nTo disable `ejc-sql` wrapper around `org-mode` SQL source code blocks, set\n`ejc-org-mode-babel-wrapper` to `nil` (enabled by default).\n\nIf `ejc-org-mode-babel-wrapper` is enabled and the current SQL source code block\nhas a connection header arguments, you will be asked for confirmation.\n\nReference this [discussion](https://github.com/kostafey/ejc-sql/pull/74).\n\n\u003ca id=\"use-existing-nrepl\"\u003e\u003c/a\u003e\n### Use existing nREPL\n\n\u003ca id=\"dedicated-nrepl\"\u003e\u003c/a\u003e\n#### Dedicated ejc-sql nREPL\n\nIf you have to restart Emacs multiple times, you can keep the `ejc-sql` Clojure\nbackend alive between Emacs restarts by running this backend out of Emacs, and\nconnect to it from Emacs.\n\nTo accomplish that, you should `cd` to your ejc-sql project folder (typically\n`~/.emacs.d/elpa/ejc-sql-\u003cversion\u003e`) and launch the nREPL via `lein repl`.\n\nThen run in Emacs `M-x ejc-connect-existing-repl`, type `Host` and `Port`\nfrom your `lein repl` console output.\n\nFinally, use `M-x ejc-connect` from any SQL buffer to connect to the exact\ndatabase, as always.\n\n\u003ca id=\"different-nrepl\"\u003e\u003c/a\u003e\n#### Different project nREPL\n\nYou can use different nREPL for `ejc-sql`, e.g. if you develop a Clojure project\nvia CIDER, you can use your project nREPL to interact with the database by JDBC\nand `ejc-sql`. To achieve this, enable using any CIDER nREPL for `clomacs`\nprojects in your `.emacs`:\n```lisp\n(setq clomacs-allow-other-repl t)\n```\n\nThen add `ejc-sql` to your project as a dependency in `project.clj`:\n```clojure\n(defproject some-project \"0.1.0-SNAPSHOT\"\n  ...\n  :dependencies [[org.clojure/clojure \"1.10.0\"]\n                 ...\n                 [ejc-sql \"0.4.1-SNAPSHOT\"]]\n  ...\n  )\n```\nor if you don't want to change your `project.clj` file, you can add it globally\nin `~/.lein/profiles.clj`, e.g.:\n```edn\n{:user {:plugins [[cider/cider-nrepl \"0.25.0-alpha1\"]]\n        :dependencies [[ejc-sql \"0.4.1-SNAPSHOT\"]]}}\n```\nThe actual version of `ejc-sql` backend in Clojars:\u0026nbsp;\n[![Clojars Project](https://clojars.org/ejc-sql/latest-version.svg)](https://clojars.org/ejc-sql)\n\nSo, when you start your project nREPL via `cider-jack-in`, you can open any SQL\nfile (`sql-mode` or `org-mode` buffer) and connect to the database by\n`ejc-connect` as usual and it will reuse the existing nREPL.\n\n\u003ca id=\"goto-definition-results-ring\"\u003e\u003c/a\u003e\n### Goto definition \u0026 results ring\n\nIn terms of `ejc-sql`, **SQL evaluation results** can be result sets, record\naffected messages, SQL definition of entities or error messages.\n\nAny SQL evaluation result saved to results ring - list of files\n`ejc-sql-result-0.txt`, `ejc-sql-result-1.txt`, and so on.\nThey located in the `TEMP` folder, it can be customized by `ejc-results-path`.\nThe number of files (number of previous results) can be customized by setting\n`ejc-ring-length` (10 by default).\n\nYou can see previous SQL evaluation result by \u003ckbd\u003eC-M-b\u003c/kbd\u003e\n(`ejc-show-prev-result`) in `*ejc-sql-output*` buffer.\nTo return back use \u003ckbd\u003eC-M-f\u003c/kbd\u003e (`ejc-show-next-result`). This way you can\nnavigate through the results ring.\n\nSince `*ejc-sql-output*` buffer contains `ejc-sql` connection information, it\nmakes possible to navigate through views \u0026 stored procedures code definitions.\nE.g. you can require `ejc-describe-entity` for some stored procedure, then\nrequire `ejc-describe-entity` inside `*ejc-sql-output*` for some stored\nprocedure, used in this (just described) procedure definition, and so on. Then\nyou can return to previous procedure definition by `ejc-show-prev-result`. So,\nit looks like goto definition, then return back. For the purpose of convenience,\nthe following keybindings are provided:\n* \u003ckbd\u003eM-.\u003c/kbd\u003e `ejc-describe-entity`\n* \u003ckbd\u003eM-,\u003c/kbd\u003e `ejc-show-prev-result`\n\n\u003ca id=\"keybindings\"\u003e\u003c/a\u003e\n## List of keybindings \u0026 functions\n\nNew keybindings defined in `ejc-sql-mode` minor mode:\n\n Keyboard shortcut   | Command                         | Description\n---------------------|---------------------------------|------------------------------------------------------\n \u003ckbd\u003eC-c e c\u003c/kbd\u003e  | `ejc-connect`                   | Select DB connection (configured by `ejc-create-connection`) and connect to it.\n \u003ckbd\u003eC-c e i\u003c/kbd\u003e  | `ejc-connect-interactive`       | Create new connection interactively and connect to it.\n \u003ckbd\u003eC-c C-c\u003c/kbd\u003e  | `ejc-eval-user-sql-at-point`    | Evaluate SQL script bounded by the `ejc-sql-separator` or/and buffer boundaries.\n \u003ckbd\u003eC-c C-r\u003c/kbd\u003e  | `ejc-eval-user-sql-region`     | Evaluate region selected SQL code.\n \u003ckbd\u003eC-g\u003c/kbd\u003e      | `ejc-cancel-query`              | Terminate current running query or run `keyboard-quit` if there is no running queries.\n \u003ckbd\u003eC-h t\u003c/kbd\u003e    | `ejc-describe-table`            | Describe SQL table.\n \u003ckbd\u003eC-h d\u003c/kbd\u003e    | `ejc-describe-entity`           | Get entity definition: show creation SQL of view, package, function, procedure or type.\n \u003ckbd\u003eM-.\u003c/kbd\u003e      | `ejc-describe-entity`           | Get entity definition: show creation SQL of view, package, function, procedure or type.\n \u003ckbd\u003eM-,\u003c/kbd\u003e      | `ejc-show-prev-result`          | Load previous SQL eval result in `*ejc-sql-output*` buffer.\n \u003ckbd\u003eC-c e up\u003c/kbd\u003e | `ejc-show-last-result`          | Show last result.\n \u003ckbd\u003eC-c e t\u003c/kbd\u003e  | `ejc-show-tables-list`          | Show tables list.\n \u003ckbd\u003eC-c e v\u003c/kbd\u003e  | `ejc-show-views-list`           | Show views list.\n \u003ckbd\u003eC-c e p\u003c/kbd\u003e  | `ejc-show-procedures-list`      | Show stored procedures list.\n \u003ckbd\u003eC-c e T\u003c/kbd\u003e  | `ejc-show-user-types-list`      | Show user types list.\n \u003ckbd\u003eC-c e s\u003c/kbd\u003e  | `ejc-strinp-sql-at-point`       | Strip SQL (trim java string tokens).\n \u003ckbd\u003eC-c e S\u003c/kbd\u003e  | `ejc-dress-sql-at-point`        | Dress SQL (to copy-paste it to java code).\n \u003ckbd\u003eC-c e f\u003c/kbd\u003e  | `ejc-format-sql-at-point`       | Format (pretty-print) this SQL statement.\n \u003ckbd\u003eC-M-b\u003c/kbd\u003e    | `ejc-previous-sql`              | Goto previous SQL statement (or load previous SQL eval result in `*ejc-sql-output*`).\n \u003ckbd\u003eC-M-f\u003c/kbd\u003e    | `ejc-next-sql`                  | Goto next SQL statement (or load next SQL eval result in `*ejc-sql-output*`).\n \u003ckbd\u003eC-M-S-b\u003c/kbd\u003e  | `ejc-previous-sql`              | Select from point to previous SQL statement.\n \u003ckbd\u003eC-M-S-f\u003c/kbd\u003e  | `ejc-next-sql`                  | Select from point to next SQL statement.\n\nList of other interactive functions\n\n Command                            | Description\n------------------------------------|------------------------------------------\n `ejc-connect`                      | Connect to database for current buffer\n `ejc-quit-connection`              | Close all database connections, quit Clojure REPL.\n `ejc-format-sql-region`            | Format (pretty-print) selected SQL snippet\n `ejc-mark-this-sql`                | Mark SQL script bounded by the `ejc-sql-separator` or/and buffer boundaries\n `ejc-show-tables-list`             | Show tables list\n `ejc-show-constraints-list`        | Show constraints list\n `ejc-open-log`                     | Open log\n `ejc-get-temp-editor-buffer`       | Create ad-hoc SQL editor buffer, use prefix arg number to get many buffers\n `ejc-print-cache`                  | Output current connection cache\n `ejc-invalidate-cache`             | Clean your current connection cache (database owners and tables list)\n `ejc-direx:pop-to-buffer`          | Create buffer with database structure tree\n\n## Yasnippet\n\nList of snippets:\n\n__select__ | __where__ | __inner__\n-----------|-----------|-------------\n__insert__ | __begin__ | __left__\n__update__ | __grant__ | __right__\n__delete__ | __revoke__| __alter__\n__show__   | __drop.d__| __create.d__\n\n\n## Troubleshooting\n\n```\nError running timer ‘ac-update-greedy’: (error \"Sync nREPL request timed out (op eval session...\n```\n\nIncrease `nrepl-sync-request-timeout`, e.g.:\n\n```lisp\n(setq nrepl-sync-request-timeout 60)\n```\n\n## Requirements:\n\n* [GNU Emacs](http://www.gnu.org/software/emacs/emacs.html) 26.\n* [Leiningen](http://leiningen.org) 2.x\n* [clomacs](https://github.com/clojure-emacs/clomacs)\n* [clojure/java.jdbc](https://github.com/clojure/java.jdbc) 0.5.8\n* [dash](https://github.com/magnars/dash.el)\n* [spinner.el](https://github.com/Malabarba/spinner.el)\n* [direx.el](https://github.com/m2ym/direx-el)\n* [auto-complete](https://github.com/auto-complete/auto-complete) *(optional)*\n* [company-mode](https://github.com/company-mode/company-mode) *(optional)*\n* [company-quickhelp](https://github.com/company-mode/company-quickhelp) *(optional)*\n* [flx-ido](https://github.com/lewang/flx) *(optional)*\n* [yasnippet](https://github.com/joaotavora/yasnippet) *(optional)*.\n\n## License\n\nCopyright © 2012-2024 Kostafey \u003ckostafey@gmail.com\u003e and\n[contributors](https://github.com/kostafey/ejc-sql/contributors)\n\nDistributed under the General Public License 2.0+\n","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostafey%2Fejc-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostafey%2Fejc-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostafey%2Fejc-sql/lists"}