Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to save query #23

Open
kud opened this issue Apr 14, 2020 · 1 comment
Open

A way to save query #23

kud opened this issue Apr 14, 2020 · 1 comment

Comments

@kud
Copy link

kud commented Apr 14, 2020

Hello,

It could be great to habe a way to save some requests like

SELECT a1, a2 ORDER BY parseInt(a2), parseInt(a1.split(".").join(""))

:)

@mechatroner
Copy link
Owner

Hello @kud,
The input panel already shows the last query. I tried to implement query history list using ST3 API, but it seems that my hack doesn't work as expected. So I am not sure if query history could be supported at all in a user-friendly way. When I have more time I will try to look at this again.

BTW you can use ~/.rbql_init_source.js file to define some commonly used functions e.g.

function dot_int(src_str) {
    return parseInt(src_str.split(".").join(""));
}

You will be able to use it in your queries like this:

SELECT a1, a2 ORDER BY parseInt(a2), dot_int(a1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants