You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API Documentation says the sql(stmt) function will return expanded sql, but it returns the parameterized sql after applying bind_collection. Api documentation links to Expanded Sql sqlite doc.
Here's a snip of what I'm doing:
forawait(conststmtofsqlite.sqlite3.statements(dbConn,sql)){if(parameters!=null){letbindresult=awaitsqlite.sqlite3.bind_collection(stmt,parameters);if(bindresult!=SQLite.SQLITE_OK){console.error("unable to prepare");result.error="Unable to Prepare statement. Check your syntax or parameters";returnresult;}}console.log("Sql: "+sqlite.sqlite3.sql(stmt));//<- returns same sql as passed in//console.log("Sql: " + sqlite.sqlite3.expanded_sql(stmt)); //<- does not exist
The convention for all the wrapped sqlite3 functions is to use the name without sqlite3_, so sql() is a wrapper for sqlite3_sql(). I think you're confused by the URL to the SQLite page, which documents other functions besides sqlite3_sql().
You're correct that a wrapper for sqlite3_expanded_sql() does not exist.
I'm moving this to a discussion because I'm not committing to providing a wrapper for sqlite3_expanded_sql() as yet.
Repository owner
locked and limited conversation to collaborators
Aug 11, 2024
API Documentation says the
sql(stmt)
function will return expanded sql, but it returns the parameterized sql after applyingbind_collection
. Api documentation links to Expanded Sql sqlite doc.Here's a snip of what I'm doing:
It seems like API documentation needs to be updated and the
expanded_sql
function should be implemented.(or I'm doing something wrong)
https://www.sqlite.org/c3ref/expanded_sql.html
The text was updated successfully, but these errors were encountered: