blob: 3f708936dc479eae1bd1475d6e356156b8a40612 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
.Dd January 24, 2024
.Dt SQLITE3_DATA_COUNT 3
.Os
.Sh NAME
.Nm sqlite3_data_count
.Nd number of columns in a result set
.Sh SYNOPSIS
.In sqlite3.h
.Ft int
.Fo sqlite3_data_count
.Fa "sqlite3_stmt *pStmt"
.Fc
.Sh DESCRIPTION
The sqlite3_data_count(P) interface returns the number of columns in
the current row of the result set of prepared statement
P.
If prepared statement P does not have results ready to return (via
calls to the sqlite3_column() family of interfaces)
then sqlite3_data_count(P) returns 0.
The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
The sqlite3_data_count(P) routine returns 0 if the previous call to
sqlite3_step(P) returned SQLITE_DONE.
The sqlite3_data_count(P) will return non-zero if previous call to
sqlite3_step(P) returned SQLITE_ROW, except in
the case of the PRAGMA incremental_vacuum
where it always returns zero since each step of that multi-step pragma
returns 0 columns of data.
.Pp
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 4988.
.Bd -literal
SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
.Ed
.Sh SEE ALSO
.Xr sqlite3_column_blob 3 ,
.Xr sqlite3_column_count 3 ,
.Xr sqlite3_step 3 ,
.Xr sqlite3_stmt 3 ,
.Xr SQLITE_OK 3
|