OLD | NEW |
1 /* | 1 /* |
2 ** 2011 Jan 27 | 2 ** 2011 Jan 27 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 p->pFts3Tab->nIndex = 1; | 109 p->pFts3Tab->nIndex = 1; |
110 | 110 |
111 memcpy((char *)p->pFts3Tab->zDb, zDb, nDb); | 111 memcpy((char *)p->pFts3Tab->zDb, zDb, nDb); |
112 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3); | 112 memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3); |
113 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName); | 113 sqlite3Fts3Dequote((char *)p->pFts3Tab->zName); |
114 | 114 |
115 *ppVtab = (sqlite3_vtab *)p; | 115 *ppVtab = (sqlite3_vtab *)p; |
116 return SQLITE_OK; | 116 return SQLITE_OK; |
117 | 117 |
118 bad_args: | 118 bad_args: |
119 *pzErr = sqlite3_mprintf("invalid arguments to fts4aux constructor"); | 119 sqlite3Fts3ErrMsg(pzErr, "invalid arguments to fts4aux constructor"); |
120 return SQLITE_ERROR; | 120 return SQLITE_ERROR; |
121 } | 121 } |
122 | 122 |
123 /* | 123 /* |
124 ** This function does the work for both the xDisconnect and xDestroy methods. | 124 ** This function does the work for both the xDisconnect and xDestroy methods. |
125 ** These tables have no persistent representation of their own, so xDisconnect | 125 ** These tables have no persistent representation of their own, so xDisconnect |
126 ** and xDestroy are identical operations. | 126 ** and xDestroy are identical operations. |
127 */ | 127 */ |
128 static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){ | 128 static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){ |
129 Fts3auxTable *p = (Fts3auxTable *)pVtab; | 129 Fts3auxTable *p = (Fts3auxTable *)pVtab; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 0, /* xRelease */ | 541 0, /* xRelease */ |
542 0 /* xRollbackTo */ | 542 0 /* xRollbackTo */ |
543 }; | 543 }; |
544 int rc; /* Return code */ | 544 int rc; /* Return code */ |
545 | 545 |
546 rc = sqlite3_create_module(db, "fts4aux", &fts3aux_module, 0); | 546 rc = sqlite3_create_module(db, "fts4aux", &fts3aux_module, 0); |
547 return rc; | 547 return rc; |
548 } | 548 } |
549 | 549 |
550 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ | 550 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */ |
OLD | NEW |