MCPcopy Index your code
hub / github.com/outerbase/studio / parseFTS5

Function parseFTS5

src/drivers/sqlite/sql-parse-table.ts:488–523  ·  view source on GitHub ↗
(cursor: CursorV2)

Source from the content-addressed store, hash-verified

486}
487
488function parseFTS5(cursor: CursorV2): DatabaseTableFts5 {
489 if (!cursor) return {};
490
491 let content: string | undefined;
492 let contentRowId: string | undefined;
493
494 const ptr = cursor;
495 while (!ptr.end()) {
496 if (ptr.match("content")) {
497 ptr.next();
498 if (ptr.match("=")) {
499 ptr.next();
500 if (!ptr.end()) {
501 content = unescapeIdentity(ptr.read());
502 ptr.next();
503 }
504 }
505 } else if (ptr.match("content_rowid")) {
506 ptr.next();
507 if (ptr.match("=")) {
508 ptr.next();
509 if (!ptr.end()) {
510 contentRowId = unescapeIdentity(ptr.read());
511 ptr.next();
512 }
513 }
514 }
515
516 ptr.next();
517 }
518
519 return {
520 content,
521 contentRowId,
522 };
523}
524
525function parseTableOption(cursor: CursorV2):
526 | {

Callers 1

parseCreateTableScriptFunction · 0.85

Calls 5

unescapeIdentityFunction · 0.90
endMethod · 0.80
nextMethod · 0.80
readMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected