MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / line_is_command_terminator

Function line_is_command_terminator

modules/dasSQLITE/sqlite/shell.c:26403–26412  ·  view source on GitHub ↗

** Return TRUE if the line typed in is an SQL command terminator other ** than a semi-colon. The SQL Server style "go" command is understood ** as is the Oracle "/". */

Source from the content-addressed store, hash-verified

26401** as is the Oracle "/".
26402*/
26403static int line_is_command_terminator(char *zLine){
26404 while( IsSpace(zLine[0]) ){ zLine++; };
26405 if( zLine[0]=='/' )
26406 zLine += 1; /* Oracle */
26407 else if ( ToLower(zLine[0])=='g' && ToLower(zLine[1])=='o' )
26408 zLine += 2; /* SQL Server */
26409 else
26410 return 0;
26411 return quickscan(zLine, QSS_Start, 0)==QSS_Start;
26412}
26413
26414/*
26415** The CLI needs a working sqlite3_complete() to work properly. So error

Callers 1

process_inputFunction · 0.85

Calls 3

IsSpaceFunction · 0.85
ToLowerFunction · 0.85
quickscanFunction · 0.85

Tested by

no test coverage detected