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

Function line_is_complete

modules/dasSQLITE/sqlite/shell.c:26426–26434  ·  view source on GitHub ↗

** Return true if zSql is a complete SQL statement. Return false if it ** ends in the middle of a string literal or C-style comment. */

Source from the content-addressed store, hash-verified

26424** ends in the middle of a string literal or C-style comment.
26425*/
26426static int line_is_complete(char *zSql, int nSql){
26427 int rc;
26428 if( zSql==0 ) return 1;
26429 zSql[nSql] = ';';
26430 zSql[nSql+1] = 0;
26431 rc = sqlite3_complete(zSql);
26432 zSql[nSql] = 0;
26433 return rc;
26434}
26435
26436/*
26437** Run a single line of SQL. Return the number of errors.

Callers 1

process_inputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected