GithubHelp home page GithubHelp logo

standardgalactic / emacs-edbi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiwanami/emacs-edbi

0.0 1.0 0.0 79 KB

Database Interface for Emacs Lisp

Emacs Lisp 95.04% Perl 4.81% Shell 0.15%

emacs-edbi's Introduction

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

emacs-edbi's People

Contributors

buzztaiki avatar kiwanami avatar llibra avatar purcell avatar tdavis avatar tkf avatar tomterl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.