{"id":13578278,"url":"https://github.com/syohex/emacs-sqlite3","last_synced_at":"2025-05-06T00:31:54.384Z","repository":{"id":66979319,"uuid":"56908377","full_name":"syohex/emacs-sqlite3","owner":"syohex","description":"sqlite3 binding of Emacs Lisp","archived":false,"fork":false,"pushed_at":"2023-08-18T04:58:13.000Z","size":34,"stargazers_count":35,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T12:42:37.259Z","etag":null,"topics":["dynamic-module","emacs-lisp","sqlite3"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syohex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2016-04-23T08:17:10.000Z","updated_at":"2023-06-20T00:23:43.000Z","dependencies_parsed_at":"2024-03-17T06:57:24.806Z","dependency_job_id":null,"html_url":"https://github.com/syohex/emacs-sqlite3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syohex%2Femacs-sqlite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syohex%2Femacs-sqlite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syohex%2Femacs-sqlite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syohex%2Femacs-sqlite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syohex","download_url":"https://codeload.github.com/syohex/emacs-sqlite3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252598441,"owners_count":21774257,"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":["dynamic-module","emacs-lisp","sqlite3"],"created_at":"2024-08-01T15:01:29.048Z","updated_at":"2025-05-06T00:31:54.362Z","avatar_url":"https://github.com/syohex.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# sqlite3.el\n\n*NOTE Emacs 29 supports native sqlite3. You can access sqlite3 DB without this module*\n\n[sqlite](https://www.sqlite.org/) binding of Emacs Lisp inspired by [mruby-sqlite3](https://github.com/mattn/mruby-sqlite3)\n\n## Sample\n\n``` lisp\n(require 'sqlite3)\n\n(progn\n  (with-current-buffer (get-buffer-create \"*sqlite*\")\n    (erase-buffer))\n\n  (let ((db (sqlite3-new \"example/example.db\")))\n    (sqlite3-execute-batch db \"CREATE TABLE foo(id integer primary key, editor text);\")\n    (sqlite3-execute-batch db \"INSERT INTO foo(editor) values(?)\" [\"Vim\"])\n    (sqlite3-execute-batch db \"INSERT INTO foo(editor) values(?)\" [\"Emacs\"])\n    (sqlite3-execute-batch db \"INSERT INTO foo(editor) values(?)\" [\"Atom\"])\n    (sqlite3-execute-batch db \"INSERT INTO foo(editor) values(?)\" [\"Notepad\"])\n\n    (sqlite3-execute\n     db\n     \"SELECT * FROM foo\"\n     (lambda (row fields)\n       (let ((id (car row))\n             (editor (cadr row)))\n         (with-current-buffer (get-buffer \"*sqlite*\")\n           (insert (format \"@@ ID=%d, Editor=%s\\n\" id editor))))))\n    (pop-to-buffer (get-buffer \"*sqlite*\"))))\n```\n\n## Interfaces\n\n#### `(sqlite3-new \u0026optional db-path)`\n\nCreate sqlite3 instance. If `db-path` is omitted, data is stored in memory.\n\n#### `(sqlite3-execute-batch db query \u0026optional bounds)`\n\nExecute SQL `query` for `db` database.\nFirst argument `db` must be sqlite3 instance. If you use placeholders in `query`,\nthen you must pass `bounds` too.\n\n#### `(sqlite3-execute db query \u0026rest args)`\n\nInterface for executing `SELECT` query.\n\nRest parameters are `bounds` and `callback`. You can its argument as, either '(bounds) or '(callback) or '(bounds callback). `callback` function is called with database row. `callback' takes two arguments, first argument is row element of list, second argument is field names of list.\n\n#### `(sqlite3-resultset-next resultset)`\n\nReturn next row.\n\n#### `(sqlite3-resultset-fields resultset)`\n\nReturn fields name of row.\n\n#### `(sqlite3-resultset-eof resultset)`\n\nReturn `t` if there is no more row.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyohex%2Femacs-sqlite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyohex%2Femacs-sqlite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyohex%2Femacs-sqlite3/lists"}