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

Function parseTableOption

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

Source from the content-addressed store, hash-verified

523}
524
525function parseTableOption(cursor: CursorV2):
526 | {
527 strict?: boolean;
528 withoutRowId?: boolean;
529 }
530 | undefined {
531 if (cursor.match("WITHOUT")) {
532 cursor.next();
533 if (cursor.match("ROWID")) {
534 cursor.next();
535 if (cursor.match(",")) {
536 cursor.next();
537 return { withoutRowId: true, ...parseTableOption(cursor) };
538 } else {
539 return { withoutRowId: true };
540 }
541 }
542 } else if (cursor.match("STRICT")) {
543 cursor.next();
544 if (cursor.match(",")) {
545 cursor.next();
546 return { strict: true, ...parseTableOption(cursor) };
547 } else {
548 return { strict: true };
549 }
550 }
551}
552
553// Our parser follows this spec
554// https://www.sqlite.org/lang_createtable.html

Callers 1

parseCreateTableScriptFunction · 0.85

Calls 2

nextMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…