blob: 60c09ead261077dcc65ee2f839b54d17b07e6f25 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
.Dd January 24, 2024
.Dt SQLITE3_STR_ERRCODE 3
.Os
.Sh NAME
.Nm sqlite3_str_errcode ,
.Nm sqlite3_str_length ,
.Nm sqlite3_str_value
.Nd status of a dynamic string
.Sh SYNOPSIS
.In sqlite3.h
.Ft int
.Fo sqlite3_str_errcode
.Fa "sqlite3_str*"
.Fc
.Ft int
.Fo sqlite3_str_length
.Fa "sqlite3_str*"
.Fc
.Ft char *
.Fo sqlite3_str_value
.Fa "sqlite3_str*"
.Fc
.Sh DESCRIPTION
These interfaces return the current status of an sqlite3_str
object.
.Pp
If any prior errors have occurred while constructing the dynamic string
in sqlite3_str X, then the sqlite3_str_errcode(X)
method will return an appropriate error code.
The sqlite3_str_errcode(X) method returns SQLITE_NOMEM
following any out-of-memory error, or SQLITE_TOOBIG if
the size of the dynamic string exceeds SQLITE_MAX_LENGTH,
or SQLITE_OK if there have been no errors.
.Pp
The sqlite3_str_length(X) method returns the current
length, in bytes, of the dynamic string under construction in sqlite3_str
object X.
The length returned by sqlite3_str_length(X) does
not include the zero-termination byte.
.Pp
The sqlite3_str_value(X) method returns a pointer
to the current content of the dynamic string under construction in
X.
The value returned by sqlite3_str_value(X) is managed
by the sqlite3_str object X and might be freed or altered by any subsequent
method on the same sqlite3_str object.
Applications must not used the pointer returned sqlite3_str_value(X)
after any subsequent method call on the same object.
Applications may change the content of the string returned by sqlite3_str_value(X)
as long as they do not write into any bytes outside the range of 0
to sqlite3_str_length(X) and do not read or write
any byte after any subsequent sqlite3_str method call.
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 8481.
.Bd -literal
SQLITE_API int sqlite3_str_errcode(sqlite3_str*);
SQLITE_API int sqlite3_str_length(sqlite3_str*);
SQLITE_API char *sqlite3_str_value(sqlite3_str*);
.Ed
.Sh SEE ALSO
.Xr sqlite3_str 3 ,
.Xr SQLITE_OK 3
|