Which func could get the number of rows?
There is no function to retrieve the number of rows in a result set. SQLite doesn’t know the number in advance, but returns row by row while iterating through the tables. The application can increment a row counter as needed at every successful sqlite3_step() . Some wrappers are able to collect all rows in a resultset in a in-memory table, so they can return the number of rows.