Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
KSQL_STMT_ALLOC(3)	 BSD Library Functions Manual	    KSQL_STMT_ALLOC(3)

NAME
     ksql_stmt_alloc --	allocate a statement on	a database connection

LIBRARY
     library "ksql"

SYNOPSIS
     #include <ksql.h>

     enum ksqlc
     ksql_stmt_alloc(struct ksql *sql, struct ksql_stmt	**stmt,
	 const char *sqlstmt, size_t id);

DESCRIPTION
     The ksql_stmt_alloc function allocates a SQL statement sqlstmt on a data-
     base connection sql previously opened with	ksql_open(3).  It must be
     matched by	a call to ksql_stmt_free(3).  Upon success, this will fill in
     the stmt pointer.	The idenitfier id is currently not used.

     The ksql_stmt_alloc function handles a locked database (specifically,
     SQLITE_BUSY, SQLITE_LOCKED, or SQLITE_PROTOCOL) by	sleeping for a random
     interval, then trying again infinitely.

RETURN VALUES
     This returns KSQL_MEM on allocation failure, KSQL_NOTOPEN if the database
     isn't connected, or KSQL_DB if there were errors invoking
     sqlite3_prepare_v2, otherwise KSQL_OK on success.

SEE ALSO
     sqlite3_prepare_v2(3)

BSD				 April 5, 2016				   BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=ksql_stmt_alloc&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help