xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_data_count.3 (revision 82d56013d7b633d116a93943de88e08335357a7c)
1.Dd December 19, 2018
2.Dt SQLITE3_DATA_COUNT 3
3.Os
4.Sh NAME
5.Nm sqlite3_data_count
6.Nd Number of columns in a result set
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_data_count
10.Fa "sqlite3_stmt *pStmt"
11.Fc
12.Sh DESCRIPTION
13The sqlite3_data_count(P) interface returns the number of columns in
14the current row of the result set of prepared statement
15P.
16If prepared statement P does not have results ready to return (via
17calls to the  sqlite3_column_*() of interfaces)
18then sqlite3_data_count(P) returns 0.
19The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
20The sqlite3_data_count(P) routine returns 0 if the previous call to
21sqlite3_step(P) returned SQLITE_DONE.
22The sqlite3_data_count(P) will return non-zero if previous call to
23sqlite3_step(P) returned SQLITE_ROW, except in
24the case of the PRAGMA incremental_vacuum
25where it always returns zero since each step of that multi-step pragma
26returns 0 columns of data.
27.Pp
28.Sh SEE ALSO
29.Xr sqlite3_stmt 3 ,
30.Xr sqlite3_column_count 3 ,
31.Xr sqlite3_column_blob 3 ,
32.Xr sqlite3_step 3 ,
33.Xr SQLITE_OK 3
34