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

rename and expose sqlite3_quote_name #32

Closed
riastradh-probcomp opened this issue Jun 5, 2015 · 4 comments
Closed

rename and expose sqlite3_quote_name #32

riastradh-probcomp opened this issue Jun 5, 2015 · 4 comments

Comments

@riastradh-probcomp
Copy link
Contributor

No description provided.

@gregory-marton
Copy link
Contributor

It seems like a decent name, actually. Perhaps sql_quoted(...)?
In what sense is it not exposed?

The thing that seems hard is to remember to quote names, and to figure out which things are names and therefore need quoting and should be formatted into the query string, vs. values that bql will take care of quoting or otherwise encoding to fill in a '?' or ':name' pattern. One almost wants to make a wrapper on db.execute that tries to figure it out for you magically.

@riastradh-probcomp
Copy link
Contributor Author

Expose: Provide in the public bayeslite module, not in the internal bayeslite.sqlite3_util module.

Rename: Names exposed in the bayeslite module are generally not specific to sqlite3 and could, in principle, be reflected in a postgresql implementation of the same API, so the lexeme sqlite3 is inappropriate here. The quotation works for SQL and BQL alike, so the lexeme sql is not entirely appropriate either.

@tibbetts tibbetts added this to the public release milestone Aug 11, 2015
@riastradh-probcomp
Copy link
Contributor Author

Fixed in 2013846 (but see issue #156).

@riastradh-probcomp
Copy link
Contributor Author

For lazy posterity: the name I chose was bql_quote_name, even though it works just as well in SQL. That fact is not terribly important.

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

3 participants