MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / _is_command_terminator

Function _is_command_terminator

src/database/cppsqlite3.cpp:1297–1307  ·  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

1295** as is the Oracle "/".
1296*/
1297static int _is_command_terminator(const char *zLine){
1298 while( isspace(*(unsigned char*)zLine) ){ zLine++; };
1299 if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ){
1300 return 1; /* Oracle */
1301 }
1302 if( tolower(zLine[0])=='g' && tolower(zLine[1])=='o'
1303 && _all_whitespace(&zLine[2]) ){
1304 return 1; /* SQL Server */
1305 }
1306 return 0;
1307}
1308
1309/*
1310** Return true if zSql is a complete SQL statement. Return false if it

Callers 1

process_inputFunction · 0.85

Calls 1

_all_whitespaceFunction · 0.85

Tested by

no test coverage detected