Comments (4)
OK, I'll show you code later.
Well, do you use history list?
from emacs-edbi.
Thank you! I was hoping I can open the Database View with code so that I can automatically open the database for a given project (ie Ruby on Rails) I am working in.
So in code, I want to determine the project root, find the database connection settings, and launch the Database View given the database info found in the database setting files.
Thanks again for your help.
from emacs-edbi.
Here is a direct open code:
(defun edbi:open-db-viewer-with-info (uri &optional user auth)
"Open Database viewer buffer with data source info."
(let ((data-source (edbi:data-source uri user auth))
(conn (edbi:start)))
(edbi:connect conn data-source)
(edbi:dbview-open conn)))
usage:
(edbi:open-db-viewer-with-info "dbi:Pg:dbname=xxxx" "username" "password")
Your idea sounds good. We usually open DB views for the project specific database.
The setting or parsing configuration file may be difficult to implement completely.
So, I think remembering the pair info between the project root directory and data source is reasonable to use generally.
from emacs-edbi.
Great! That is exactly what I was looking for. Thanks!
from emacs-edbi.
Related Issues (20)
- Unable to save query editor file content to file. HOT 9
- can you remove auto-complete dependency? HOT 8
- Is it possible to store the connection details? HOT 1
- How configure edbi to stay in the query window? HOT 8
- Change the window-title edbi:query-result without number HOT 1
- Multiple queries possible? HOT 2
- Can't install from melpa-stable HOT 3
- No rows shown in result for SQL Server query with ntext column
- I can't connect mysql database HOT 1
- Query returns nil when value is 0
- A way to connect to other not SQL dbs?
- add two tips HOT 1
- Cannot open a sqlite database that has been created using WAL mode HOT 2
- make emacs-edbi aware of local::lib installations of RPC::EPC::Service and DBI modules HOT 2
- Selected row colors in Emacs dark modes?
- Quoting tables
- Does your library have functions for reading columns directly from the sql results into elisp? HOT 1
- Add connection bookmarks/names
- Export the query results
- Query execute does not return?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-edbi.