(cursor: CursorV2)
| 523 | } |
| 524 | |
| 525 | function 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 |
no test coverage detected
searching dependent graphs…