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] Cursor Scan filter #92

Open
youen opened this issue May 4, 2022 · 1 comment
Open

[PROPOSAL] Cursor Scan filter #92

youen opened this issue May 4, 2022 · 1 comment

Comments

@youen
Copy link
Member

youen commented May 4, 2022

To extract a large part of table's lines. It's faster to fetch all lines and apply filter after.

This is a proposal to add a flag --scan to the lino pull action.

--scan is activable only for one table pull (mainly with the --table flag) and execute filter ( -f and -F) in memory.

@adrienaury
Copy link
Member

adrienaury commented Feb 15, 2023

It should be possible to use this option with an ingress-descriptor.

Proposal

$ lino pull bdd --limit 3
{"birth_date":"2000-09-07T00:00:00Z","fk_pets_owner_id":{"address":"110 W. Liberty St.","city":"Madison","first_name":"George","id":1,"last_name":"Franklin","telephone":"6085551023"},"fk_visits_pet_id":[],"id":1,"name":"Leo","owner_id":1,"type_id":1}
{"birth_date":"2002-08-06T00:00:00Z","fk_pets_owner_id":{"address":"638 Cardinal Ave.","city":"Sun Prairie","first_name":"Betty","id":2,"last_name":"Davis","telephone":"6085551749"},"fk_visits_pet_id":[],"id":2,"name":"Basil","owner_id":2,"type_id":6}
{"birth_date":"2001-04-17T00:00:00Z","fk_pets_owner_id":{"address":"2693 Commerce St.","city":"McFarland","first_name":"Eduardo","id":3,"last_name":"Rodriquez","telephone":"6085558763"},"fk_visits_pet_id":[],"id":3,"name":"Rosy","owner_id":3,"type_id":2}

$ lino pull bdd --scan --limit 3
{"owner":{"address":"110 W. Liberty St.","city":"Madison","first_name":"George","id":1,"last_name":"Franklin","telephone":"6085551023"}}
{"owner":{"address":"638 Cardinal Ave.","city":"Sun Prairie","first_name":"Betty","id":2,"last_name":"Davis","telephone":"6085551749"}}
{"owner":{"address":"2693 Commerce St.","city":"McFarland","first_name":"Eduardo","id":3,"last_name":"Rodriquez","telephone":"6085558763"}}
{"pet":{"birth_date":"2000-09-07T00:00:00Z","id":1,"name":"Leo","owner_id":1,"type_id":1}}
{"pet":{"birth_date":"2002-08-06T00:00:00Z","id":2,"name":"Basil","owner_id":2,"type_id":6}}
{"pet":{"birth_date":"2001-04-17T00:00:00Z","id":3,"name":"Rosy","owner_id":3,"type_id":2}}

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