You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the sqlite3 source there is at least one example where case statements are nested. I'm sure this is possible due to the correct chain of gotos. But it's also valid in C and not in Go.
Here is an example:
caseOP_ReopenIdx: {
intnField;
KeyInfo*pKeyInfo;
intp2;
intiDb;
intwrFlag;
Btree*pX;
VdbeCursor*pCur;
Db*pDb;
assert( pOp->p5==0||pOp->p5==OPFLAG_SEEKEQ );
assert( pOp->p4type==P4_KEYINFO );
pCur=p->apCsr[pOp->p1];
if( pCur&&pCur->pgnoRoot==(u32)pOp->p2 ){
assert( pCur->iDb==pOp->p3 ); /* Guaranteed by the code generator */
goto open_cursor_set_hints;
}
/* If the cursor is not currently open or is open on a different ** index, then fall through into OP_OpenRead to force a reopen */caseOP_OpenRead:
caseOP_OpenWrite:
assert( pOp->opcode==OP_OpenWrite||pOp->p5==0||pOp->p5==OPFLAG_SEEKEQ );
assert( p->bIsReader );
assert( pOp->opcode==OP_OpenRead||pOp->opcode==OP_ReopenIdx||p->readOnly==0 );
if( p->expired ){
rc=SQLITE_ABORT_ROLLBACK;
goto abort_due_to_error;
}
The text was updated successfully, but these errors were encountered:
In the sqlite3 source there is at least one example where case statements are nested. I'm sure this is possible due to the correct chain of
goto
s. But it's also valid in C and not in Go.Here is an example:
The text was updated successfully, but these errors were encountered: