Comments (9)
Will you teach me some use-case?
from emacs-edbi.
Sure.
Example one.
We write some event logs in our database. Fox example traceback in
background worker. I have few SQL scripts which make some analytic on
this data. I often need open some of this file, correct some
conditions, save file, insert file content into db query editor. I
repeat this sequence few times until I got satisfactory query result.
Example two.
We have SQL files with database scheme. When I correct any of this
file most of times I need execute only one paragraph from this file.
Every time I need to execute paragraph, I manually copy it to query
editor file.
Possible solution.
I think we can add query editor minor mode which will mimic default
SQL send commands. But instead of product interactive will bind this
buffer to the db viewer or open connection buffer. This behavior is
similar to slime when you send only part of the file to the inferior
lisp process.
Maybe there is a reason to replace query editor major mode with minor
mode at all. If we press c
or C
in db viewer we can simply open
new SQL buffer bind to that db viewer. In this case we doesn't need
query editor history at all because this will handled by Emacs default
undo or undo-tree systems.
from emacs-edbi.
If you doesn't interesting in this solution I can implement this as external minor-mode.
from emacs-edbi.
Hi @proofit404
Thank you for your report for use-cases and I'm sorry for my late response.
I recognize these use-cases but I'm not sure what solution is the best. I'm just using edbi's query buffer, but I heard some people want to send a SQL fragment from the string literal in code buffers.
Your minor mode idea is great. It would reduce the moving cost between edbi's query buffer and other buffers.
If you could implement it, it would be welcome!
from emacs-edbi.
In case of send a SQL fragment from the string literal in code buffers
this can be implemented with second minor mode (something like edbi-code-mode
). I think we need to simplify api also. Make it looks like cl-dbi for example.
I'd like to contribute following:
- make api more friendly to the elisp coders.
- split edbi in smaller parts (like
edbi-api.el
,edbi-dbview.el
). This will allows us to write ert test more easy. - move project to
Cask
- generic way to connect (api part). Make
edbi-dialog-ds
one of it implementation. This will simplify connection helpers writing. Myedbi-django
andedbi-database-url
for example. - generic way to complete sql-code (api part). Make
ac-edbi
to use it. Merge mycompany-edbi
in the same way. - minor mode to use edbi with simple sql buffers
If you think this changes can make sense to the project I can implement each of it part by part. I can start after new year holidays.
from emacs-edbi.
That's great! I also think that we could make a smart DB API for emacs lisp.
Well, I think this is big project. I would help you as much as possible.
I'm sorry for my slow response because of my full-time job and other projects.
from emacs-edbi.
I totally agree with you. I have full-time job and bunch of projects on github. Its very difficult to work 12 hours per day. But I use edbi every day at my full-time job. I want to improve it. I'll try my best to implement features above.
First commit can take long time for me because I'll need to learn much background. Perl, epc, ctable for example. I'll create PR with first changes nearly twentieth of January.
from emacs-edbi.
Hello one more time. I think about best order to implement mentioned features. Most of it will depend on api design. I think that better way to implement each part separately and then plan api on all those needs. After api impementation we can merge all project all together. So I close this issue for now.
from emacs-edbi.
Hi @proofit404
I think that is better too.
Thank you.
from emacs-edbi.
Related Issues (20)
- 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.