.Dd $Mdocdate$ .Dt SQLITE3_CARRAY_BIND_V2 3 .Os .Sh NAME .Nm sqlite3_carray_bind_v2 , .Nm sqlite3_carray_bind .Nd bind array values to the CARRAY table-valued function .Sh SYNOPSIS .In sqlite3.h .Ft int .Fo sqlite3_carray_bind_v2 .Fa "sqlite3_stmt *pStmt" .Fa "int i" .Fa "void *aData" .Fa "int nData" .Fa "int mFlags" .Fa "void (*xDel)(void*)" .Fa "void *pDel" .Fc .Ft int .Fo sqlite3_carray_bind .Fa "sqlite3_stmt *pStmt" .Fa "int i" .Fa "void *aData" .Fa "int nData" .Fa "int mFlags" .Fa "void (*xDel)(void*)" .Fc .Sh DESCRIPTION The sqlite3_carray_bind_v2(S,I,P,N,F,X,D) interface binds an array value to parameter that is the first argument of the carray() table-valued function. The S parameter is a pointer to the prepared statement that uses the carray() functions. I is the parameter index to be bound. I must be the index of the parameter that is the first argument to the carray() table-valued function. P is a pointer to the array to be bound, and N is the number of elements in the array. The F argument is one of constants SQLITE_CARRAY_INT32, SQLITE_CARRAY_INT64, SQLITE_CARRAY_DOUBLE, SQLITE_CARRAY_TEXT, or SQLITE_CARRAY_BLOB to indicate the datatype of the array P. .Pp If the X argument is not a NULL pointer or one of the special values SQLITE_STATIC or SQLITE_TRANSIENT, then SQLite will invoke the function X with argument D when it is finished using the data in P. The call to X(D) is a destructor for the array P. The destructor X(D) is invoked even if the call to sqlite3_carray_bind_v2() fails. If the X parameter is the special-case value SQLITE_STATIC, then SQLite assumes that the data static and the destructor is never invoked. If the X parameter is the special-case value SQLITE_TRANSIENT, then sqlite3_carray_bind_v2() makes its own private copy of the data prior to returning and never invokes the destructor X. .Pp The sqlite3_carray_bind() function works the same as sqlite3_carray_bind_v2() with a D parameter set to P. In other words, sqlite3_carray_bind(S,I,P,N,F,X) is same as sqlite3_carray_bind_v2(S,I,P,N,F,X,P). .Sh IMPLEMENTATION NOTES These declarations were extracted from the interface documentation at line 11275. .Bd -literal SQLITE_API int sqlite3_carray_bind_v2( sqlite3_stmt *pStmt, /* Statement to be bound */ int i, /* Parameter index */ void *aData, /* Pointer to array data */ int nData, /* Number of data elements */ int mFlags, /* CARRAY flags */ void (*xDel)(void*), /* Destructor for aData */ void *pDel /* Optional argument to xDel() */ ); SQLITE_API int sqlite3_carray_bind( sqlite3_stmt *pStmt, /* Statement to be bound */ int i, /* Parameter index */ void *aData, /* Pointer to array data */ int nData, /* Number of data elements */ int mFlags, /* CARRAY flags */ void (*xDel)(void*) /* Destructor for aData */ ); .Ed .Sh SEE ALSO .Xr sqlite3_destructor_type 3 , .Xr sqlite3_stmt 3 , .Xr SQLITE_CARRAY_INT32 3