• Stars
    star
    352
  • Rank 120,622 (Top 3 %)
  • Language
    Emacs Lisp
  • Created almost 13 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Database Interface for Emacs Lisp

Emacs DBI

This program connects the database server through Perl's DBI, and provides DB-accessing API and the simple management UI.

Installation:

Package installation

If you use package.el with Marmalade or MELPA, you just select the package 'edbi' and install it.

Next, you install the perl module `RPC::EPC::Service', DBI and Database drivers with CPAN.

Example:

$ cpan RPC::EPC::Service DBI DBD::SQLite DBD::Pg DBD::mysql

Here, SQLite, Postgresql and MySQL drivers will be installed, in addition to the EPC module. Of course, you can choose the drivers for your environment.

Manual installation

This program depends on following programs:

Place this program (edbi.el and edbi-bridge.pl) in your load path and add following code.

(require 'edbi)

Helper application

One can install some helper applications:

Usage:

M-x `edbi:open-db-viewer' opens a dialog for DB connection.

DB connection

  • Data Source : URI string for DBI::connect (Ex. dbi:SQLite:dbname=/path/db.sqlite )
  • User Name, Auth : user name and password for DBI::connect
  • History button : you can choose a data source from your connection history.
  • OK button : connect DB and open the database view

Database view

This buffer enumerates tables and views.

DB Tables

Check the key-bind `edbi:dbview-keymap'.

  • j,k, n,p : navigation for rows
  • c : switch to query editor buffer
  • RET : show table data
  • SPC : show table definition
  • q : quit and disconnect

Table definition view

This buffer shows the table definition information.

Table Definition

Check the key-bind `edbi:dbview-table-keymap'.

  • j,k, n,p : navigation for rows
  • c : switch to query editor buffer
  • V : show table data
  • q : kill buffer

Query editor

You can edit SQL in this buffer, which supports SQL syntax highlight and auto completion by auto-complete.el.

SQL Editor

Check the key-bind `edbi:sql-mode-map'.

  • C-c C-c : Execute SQL
  • C-c q : kill buffer
  • M-p : SQL history back
  • M-n : SQL history forward

Query result viewer

You can browser the results for executed SQL.

Query Results

Check the key-bind `edbi:dbview-query-result-keymap'.

  • j,k, n,p : navigation for rows
  • SPC : display the whole data at the current cell. (hitting the SPC again, it clears the popup.)
  • q : kill buffer

Navigation summary

Navigation Summary

E2WM perspective

E2WM perspective

Here is an example setup to open EDBI perspective with Super-d.

(autoload 'e2wm:dp-edbi "e2wm-edbi" nil t)
(global-set-key (kbd "s-d") 'e2wm:dp-edbi)

Emacs DBI API

TODO...


(C) 2012,2013,2014 SAKURAI Masashi All rights reserved. m.sakurai at kiwanami.net

More Repositories

1

emacs-calfw

A calendar framework for Emacs
Emacs Lisp
1,169
star
2

emacs-deferred

Simple asynchronous functions for emacs lisp
Emacs Lisp
312
star
3

emacs-window-manager

Customizable window manager for emacs
Emacs Lisp
229
star
4

emacs-ctable

Table Component for elisp
Emacs Lisp
209
star
5

emacs-epc

A RPC stack for Emacs Lisp
Emacs Lisp
199
star
6

emacs-skype

Skype UI for emacs users
Emacs Lisp
71
star
7

emacs-window-layout

A simple window layout management framework for emacs
Emacs Lisp
59
star
8

emacs-widget-mvc

Web like MVC framework for emacs lisp
Emacs Lisp
42
star
9

emacs-inertial-scroll

Inertial scrolling for emacs
Emacs Lisp
26
star
10

emacs-cacoo

Minor mode for Cacoo (http://cacoo.com)
Emacs Lisp
16
star
11

emacs-anything-books

Opening your PDF books by the anything interface
Emacs Lisp
16
star
12

emacs-id-manager

ID/Password management tool for emacs users
Emacs Lisp
16
star
13

emacs-3d-demo

Emacs Lisp
15
star
14

emacs-tern-project-dialog

GUI frontend for ternjs project config
Emacs Lisp
8
star
15

emacs-portage-navi

Portage Navigation GUI
Emacs Lisp
8
star
16

emacs-github

github utilities for emacs interface
Emacs Lisp
7
star
17

node-elrpc

EPC (RPC Stack for Emacs Lisp) for NodeJS
JavaScript
7
star
18

go-elrpc

EPC (RPC Stack for Emacs Lisp) for Go
Go
7
star
19

vsc-smartchr

smartchr for vscode
TypeScript
6
star
20

ruby-elparser

A parser for S-expression of emacs lisp
Ruby
6
star
21

ruby-elrpc

EPC (RPC Stack for Emacs Lisp) for Ruby
Ruby
5
star
22

node-elparser

A parser for S-expression of emacs lisp
JavaScript
5
star
23

emacs-elroutine

multi-process experiments
Emacs Lisp
4
star
24

emacs-anything-fpr

finding any resource of a project
Emacs Lisp
4
star
25

portage-overlay

kiwanami overlay packages
Shell
3
star
26

chrome-backlog-autofilter

Chrome Extension: Autofilter UI for backlog.jp
JavaScript
3
star
27

java-inou

Integrated Numerical Operation Utilities
Java
2
star
28

py-screenlets

Some screenlets for Japanese users
Python
2
star
29

gm-backlog-autofilter

Greasemonkey script: Autofilter UI for backlog.jp
JavaScript
2
star
30

ruby-upstart-diagram

Generate a dependency diagram for upstart jobs and events.
Ruby
2
star
31

chrome-backlog-wiki

Chrome Extension: Wiki improvement for backlog.jp
JavaScript
2
star
32

java-jlambda

Small experiments: pattern matching etc. (archive)
Java
1
star
33

java-webcont

Continuation Web Framework in Java (archive)
Java
1
star
34

emacs-kovlive

kovlive interface for emacs
Emacs Lisp
1
star
35

gm-backlog-wiki

Greasemonkey script: Wiki improvement for backlog.jp
JavaScript
1
star
36

java-inou-rpc

RPC server and client
Java
1
star
37

ruby-yajb

Yet Another Java Bridge
Ruby
1
star