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

[PROPOSAL] new raw SQL action #20

Open
youen opened this issue Jun 8, 2021 · 1 comment
Open

[PROPOSAL] new raw SQL action #20

youen opened this issue Jun 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@youen
Copy link
Collaborator

youen commented Jun 8, 2021

Motivation

Some simple sql queries have better optimization than LINO'pull algorithm (such as DISTINCT).

Proposal

This is a proposal to add a new sql action. SQL query is read from standard input and result is dump as jsonline in standard output.

Example

$ echo "select * from public.customer" | lino sql source
{"id" : 1,  "name":  "Robert"}
{"id" : 2,  "name":  "Nick"}
...
@youen youen added the enhancement New feature or request label Jun 8, 2021
@adrienaury
Copy link
Member

How would insert or update statement work ?

Insert with returning clause

$ echo "insert into public.customer(...) values (...) returning id" | lino sql source
{"id" : 15}

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

No branches or pull requests

2 participants