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

FreeBSD Manual Pages

  
 
  

home | help
KSQL_STMT_STEP(3)	    Library Functions Manual	     KSQL_STMT_STEP(3)

NAME
       ksql_stmt_cstep,	 ksql_stmt_step	 -- get	the next row of	results	from a
       statement

LIBRARY
       library "ksql"

SYNOPSIS
       #include	<sys/types.h>
       #include	<stdint.h>
       #include	<ksql.h>

       enum ksqlc
       ksql_stmt_step(struct ksqlstmt *stmt);

       enum ksqlc
       ksql_stmt_cstep(struct ksqlstmt *stmt);

DESCRIPTION
       The ksql_stmt_step() and	ksql_stmt_cstep() functions query the next row
       of results from a statement prepared with ksql_stmt_alloc(3).  The  two
       functions  differ  in  that ksql_stmt_step() fails when a constraint is
       violated, while ksql_stmt_cstep() returns KSQL_CONSTRAINT instead.

       These functions handle a	locked	database  (specifically,  SQLITE_BUSY,
       SQLITE_LOCKED,  or  SQLITE_PROTOCOL) by sleeping	for a random interval,
       then trying again infinitely.

RETURN VALUES
       These functions return several error conditions:	 KSQL_NOTOPEN  if  the
       database	 connection  has  not been opened; KSQL_DB on database errors,
       including constraint violations with ksql_stmt_step(); and KSQL_MEM  on
       memory allocation failure.

       It  also	 returns the following non-error conditions: KSQL_ROW if a row
       is available for	examining, KSQL_DONE if	no more	rows are available, or
       KSQL_CONSTRAINT if ksql_stmt_cstep() was	used and a constraint was vio-
       lated,

SEE ALSO
       sqlite3_step(3)

FreeBSD	Ports 14.quarterly	  May 9, 2018		     KSQL_STMT_STEP(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ksql_stmt_step&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help