ejc-sql icon indicating copy to clipboard operation
ejc-sql copied to clipboard

Does your library have a lower level API for reading results into lisp lists?

Open vonHabsi opened this issue 4 years ago • 2 comments

emacs-sqlite3-api has the sqlite3-column-* functions for retrieving the results of a row.

Does your package have functions which can be used in this manner?

vonHabsi avatar Feb 14 '20 16:02 vonHabsi

@vonHabsi Not really. It was in the early versions. It's not actually a library, it aims to be an application. The actual behavior is:

  1. The user asks JVM backend to evaluate an SQL query via Http by running Elisp function.
  2. JVM backend starts an independent process for query evaluation. -- Here the user can pass a request to terminate the evaluation process. --
  3. When evaluation finishes, it prints the results to the file.
  4. The JVM process asks Emacs via Http to show this result from the file in the results buffer.

So, there is no actual "result" for the query evaluation request. But it's very easy to implement. E.g. we can add an Elisp wrapper to function like this: https://github.com/kostafey/ejc-sql/blob/master/src/ejc_sql/structure.clj#L44

Do you interested in such an API?

kostafey avatar Feb 14 '20 17:02 kostafey

Do you interested in such an API?

Yes I am. I am looking for general API for SQL programming and emacs/elisp doesn't seem to have one.

vonHabsi avatar Feb 14 '20 17:02 vonHabsi