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

table.convert(..., where=) and sqlite-utils convert ... --where= #304

Closed
simonw opened this issue Aug 2, 2021 · 3 comments
Closed

table.convert(..., where=) and sqlite-utils convert ... --where= #304

simonw opened this issue Aug 2, 2021 · 3 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Aug 2, 2021

For applying the conversion to a subset of rows selected using the where clause.

Should also take optional arguments, as seen in db["dogs"].delete_where("age < ?", [3]).

Follows #302 and #251. This was originally simonw/sqlite-transform#9

@simonw
Copy link
Owner Author

simonw commented Aug 2, 2021

For the command-line version this can duplicate the --param option to allow named parameters in the where clause:

@click.option(
"-p",
"--param",
multiple=True,
type=(str, str),
help="Named :parameters for SQL query",
)

@simonw
Copy link
Owner Author

simonw commented Aug 2, 2021

For the Python function, the args will be where=None, where_args=None.

simonw added a commit that referenced this issue Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant