David Fletcher wrote: > create table if not exists StmtSQL ( > StmtName TEXT NOT NULL UNIQUE, > SQL TEXT NOT NULL); > > The GetPreparedStmt() function retrieves the SQL from table, creates a new > sqlite3_statement object (or retrieves this from a cache). > > It strikes me that this would be nicer if sqlite offered this as an > intrinsic capability.
How would SQLite know what the table and column names are? How would that API be different from exec("SELECT SQL From StmtSQL WHERE StmtName = ?")+prepare? > people might find it easier to share collections of SQL statements designed > for various tasks. This would require all databases to have the same schema, or some automatic mechanism to adjust table/column names. And getting the table/column names right is the smallest problem when writing a query (or choosing which one to copy). I don't see how this would be an improvement over the NoSQL database commonly known as Stack Overflow. :) Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users