Giter Site home page Giter Site logo

Comments (4)

gregory-marton avatar gregory-marton commented on May 21, 2024

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.

from bayeslite.

riastradh-probcomp avatar riastradh-probcomp commented on May 21, 2024

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.

from bayeslite.

riastradh-probcomp avatar riastradh-probcomp commented on May 21, 2024

Fixed in 2013846 (but see issue #156).

from bayeslite.

riastradh-probcomp avatar riastradh-probcomp commented on May 21, 2024

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.

from bayeslite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.