Giter Site home page Giter Site logo

Comments (9)

kiwanami avatar kiwanami commented on July 28, 2024

Will you teach me some use-case?

from emacs-edbi.

proofit404 avatar proofit404 commented on July 28, 2024

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.

proofit404 avatar proofit404 commented on July 28, 2024

If you doesn't interesting in this solution I can implement this as external minor-mode.

from emacs-edbi.

kiwanami avatar kiwanami commented on July 28, 2024

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.

proofit404 avatar proofit404 commented on July 28, 2024

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. My edbi-django and edbi-database-url for example.
  • generic way to complete sql-code (api part). Make ac-edbi to use it. Merge my company-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.

kiwanami avatar kiwanami commented on July 28, 2024

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.

proofit404 avatar proofit404 commented on July 28, 2024

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.

proofit404 avatar proofit404 commented on July 28, 2024

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.

kiwanami avatar kiwanami commented on July 28, 2024

Hi @proofit404
I think that is better too.

Thank you.

from emacs-edbi.

Related Issues (20)

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.