mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Change the fts5 content= option so that it matches fts5 columns with the underlying table columns by name, not by their position within the CREATE TABLE statement.
FossilOrigin-Name: e38e2bb637844dae8ae5d5f3e23d8369e1b91e45
This commit is contained in:
@ -65,9 +65,9 @@ static int fts5StorageGetStmt(
|
||||
assert( eStmt>=0 && eStmt<ArraySize(p->aStmt) );
|
||||
if( p->aStmt[eStmt]==0 ){
|
||||
const char *azStmt[] = {
|
||||
"SELECT * FROM %s ORDER BY %s ASC", /* SCAN_ASC */
|
||||
"SELECT * FROM %s ORDER BY %s DESC", /* SCAN_DESC */
|
||||
"SELECT * FROM %s WHERE %s=?", /* LOOKUP */
|
||||
"SELECT %s FROM %s T ORDER BY T.%Q ASC", /* SCAN_ASC */
|
||||
"SELECT %s FROM %s T ORDER BY T.%Q DESC", /* SCAN_DESC */
|
||||
"SELECT %s FROM %s T WHERE T.%Q=?", /* LOOKUP */
|
||||
|
||||
"INSERT INTO %Q.'%q_content' VALUES(%s)", /* INSERT_CONTENT */
|
||||
"REPLACE INTO %Q.'%q_content' VALUES(%s)", /* REPLACE_CONTENT */
|
||||
@ -86,7 +86,9 @@ static int fts5StorageGetStmt(
|
||||
case FTS5_STMT_SCAN_ASC:
|
||||
case FTS5_STMT_SCAN_DESC:
|
||||
case FTS5_STMT_LOOKUP:
|
||||
zSql = sqlite3_mprintf(azStmt[eStmt], pC->zContent, pC->zContentRowid);
|
||||
zSql = sqlite3_mprintf(azStmt[eStmt],
|
||||
pC->zContentExprlist, pC->zContent, pC->zContentRowid
|
||||
);
|
||||
break;
|
||||
|
||||
case FTS5_STMT_INSERT_CONTENT:
|
||||
|
Reference in New Issue
Block a user