1.\" $Id: ksql_stmt_free.3,v 1.8 2018/04/03 16:27:03 kristaps Exp $ 2.\" 3.\" Copyright (c) 2016--2017 Kristaps Dzonsons <kristaps@bsd.lv> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: April 3 2018 $ 18.Dt KSQL_STMT_FREE 3 19.Os 20.Sh NAME 21.Nm ksql_stmt_free 22.Nd free a statement on a database connection 23.Sh LIBRARY 24.Lb ksql 25.Sh SYNOPSIS 26.In sys/types.h 27.In stdint.h 28.In ksql.h 29.Ft "enum ksqlc" 30.Fo ksql_stmt_free 31.Fa "struct ksqlstmt *stmt" 32.Fc 33.Sh DESCRIPTION 34The 35.Nm 36function frees a statement allocated with 37.Xr ksql_stmt_alloc 3 , 38invoking 39.Xr sqlite3_finalize 3 40on the underlying statement. 41This does nothing if 42.Fa stmt 43is 44.Dv NULL . 45.\" .Sh CONTEXT 46.\" For section 9 functions only. 47.\" .Sh IMPLEMENTATION NOTES 48.\" Not used in OpenBSD. 49.Sh RETURN VALUES 50Returns 51.Dv KSQL_OK 52on success or another error on failure. 53.Em Note : 54this does not return the code of 55.Xr sqlite3_finalize 3 , 56which itself returns the code of the last step and not the failure of 57the resource de-allocation. 58.\" For sections 2, 3, and 9 function return values only. 59.\" .Sh ENVIRONMENT 60.\" For sections 1, 6, 7, and 8 only. 61.\" .Sh FILES 62.\" .Sh EXIT STATUS 63.\" For sections 1, 6, and 8 only. 64.\" .Sh EXAMPLES 65.\" .Sh DIAGNOSTICS 66.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only. 67.\" .Sh ERRORS 68.\" For sections 2, 3, 4, and 9 errno settings only. 69.Sh SEE ALSO 70.Xr sqlite3_finalize 3 71.\" .Xr foobar 1 72.\" .Sh STANDARDS 73.\" .Sh HISTORY 74.\" .Sh AUTHORS 75.\" .Sh CAVEATS 76.\" .Sh BUGS 77.\" .Sh SECURITY CONSIDERATIONS 78.\" Not used in OpenBSD. 79