MCPcopy Create free account
hub / github.com/2shady4u/godot-sqlite / progress_handler

Function progress_handler

src/sqlite/shell.c:22444–22457  ·  view source on GitHub ↗

** Progress handler callback. */

Source from the content-addressed store, hash-verified

22442** Progress handler callback.
22443*/
22444static int progress_handler(void *pClientData) {
22445 ShellState *p = (ShellState*)pClientData;
22446 p->nProgress++;
22447 if( p->nProgress>=p->mxProgress && p->mxProgress>0 ){
22448 sqlite3_fprintf(p->out, "Progress limit reached (%u)\n", p->nProgress);
22449 if( p->flgProgress & SHELL_PROGRESS_RESET ) p->nProgress = 0;
22450 if( p->flgProgress & SHELL_PROGRESS_ONCE ) p->mxProgress = 0;
22451 return 1;
22452 }
22453 if( (p->flgProgress & SHELL_PROGRESS_QUIET)==0 ){
22454 sqlite3_fprintf(p->out, "Progress %u\n", p->nProgress);
22455 }
22456 return 0;
22457}
22458#endif /* SQLITE_OMIT_PROGRESS_CALLBACK */
22459
22460/*

Callers

nothing calls this directly

Calls 1

sqlite3_fprintfFunction · 0.85

Tested by

no test coverage detected