i like the cute embedding approach (let users write sql directly in an sexpr and then transform it to sql in a macro) but i am wondering if there are any corner cases that break. for example, in postgres, names are quoted using (if i remember correctly) double quotes, while strings are single quotes. would that cause problems?
You are right! Hence, during the process in edbc.el, it would wrap the string with quote('), and replace every quote in the string to two quotes('', not double quotes).
no, you're misunderstanding me (i think?). what you describe escapes strings - it sounds correct, but it is not what i am asking about.
for example, when using postgres you might want (for some crazy reason) to have a table called "select". you can do that with:
select * from "select";
where the "select" is not a string, but a quoted name. without the quotes it would be a syntax error (as select is a reserved word). how would that work in edbc?
So basically this enables to use Elisp as a query language (from emacs, of course). How is this better than the sql-mode? It's a genuine question, I would like to have a concrete example of why I would use it over sql.
Actually, EFBC is from another project, Emacs-cgi, which use to create CGI script. Hence, it's run on server only.
At first, it's only works with Sqlite, and Add MySQL support yesterday, so I created a new project for it.
I think the move to program "real" applications in Emacs is smart. It encourages improvements in Emacs Lisp itself, and it leverages the skills we already have in programming Emacs.
For me, there are some reasons:
* I like use org-mode to write my Blog, it's very cool if there is a Blog system powered by Emacs-Lisp.
* For now, use PHP, JSP or any other tech to build web app, you need works with HTML, CSS, PHP... However, in Lisp, everything can describe in List (like SQL in EDBC). You can refer https://github.com/redraiment/emacs-cgi to see embedded HTML in elisp.
* There are many function for text edit in Emacs ready. Hence, I think it will suitable for build server apps.