SNOBOL4SQLITE3(3)
πΎ SNOBOL4SQLITE3(3) πΎ
okay bestie, so this is a page from the CSNOBOL4 Manual, and it's literally the SQLITE3 interface for SNOBOL4 πβ¨ yes, your fave ancient string-processing language can talk to a whole actual database now, we LOVE a crossover episode π
π NAME π
snobol4sqlite3 β the SQLITE3 interface for SNOBOL4, fr fr π¦
β¨ SYNOPSYS β¨
(yes the heading is spelled like that in the original, we do not fix, we respect the lore π)
-INCLUDE 'sqlite3.sno'
that's it. that's the whole vibe check. include it and you're in π«Ά
π DESCRIPTION π
okay so here's every single routine, one by one, no skipping, no gatekeeping π
SQLITE3_OPEN(path)opens up a database and hands you back a database handle π or it just fails. that's the gamble bestie.SQLITE3_CLOSE(db_handle)closes the database and gives you back an empty string π« or failure. rude but okay.SQLITE3_ERRMSG(db_handle)returns an SQLITE3 error string π¨ or fails if the handle is invalid. it's giving "invalid handle? not my problem".SQLITE3_LAST_INSERT_ROWID(db_handle)returns an integer β or fails if the handle is invalid. simple. iconic. no notes.SQLITE3_PREPARE(db_handle,SQL[,params ...])parses an SQL statement and optionally binds positional parameters to it π₯ callSQLITE3_ROW_ARRAY()orSQLITE3_ROW_TABLE()to fetch a row of results once all the parameters have been bound. returns a statement handle or failure. so like, prep first, fetch after, periodt.SQLITE3_BIND_ANY(st_handle, position, value)binds value at the (one-based) position to a prepared SQL statement π returns null string or failure. reminder: ONE-BASED, we are not doing zero-index brain today.SQLITE3_BIND_BLOB(st_handle, position, value)binds value to the (one-based) position as a BLOB value to a prepared SQL statement π«§ returns null string or failure.SQLITE3_BIND_MANY(st_handle, values ...)binds a whole bunch of positional parameter values at once to a prepared SQL statement π returns null string or failure. efficiency queen.SQLITE3_BIND_PARAMETER_COUNT(st_handle)returns how many parameters a prepared SQL statement needs, or it fails π’SQLITE3_BIND_PARAMETER_NAME(st_handle, position)returns the name (if there even is one π) for the parameter position number in a prepared SQL statement.SQLITE3_BIND_PARAMETER_INDEX(st_handle, name)returns the positional index for the named parameter name in a prepared SQL statement πSQLITE3_CLEAR_BINDINGS(st_handle)use this routine to reset ALL parameter bindings toNULL. full factory reset energy π§ΌSQLITE3_RESET(st_handle)resets a prepared statement back to its initial state, ready to be re-executed π heads up tho: any SQL statement variables that had values bound to them retain their values. if you actually want them gone, usesqlite3_clear_bindings()to reset the bindings. don't come crying to me when your old values are still there bestie, I warned you πSQLITE3_FINALIZE(st_handle)releases (aka deletes) a statement handle ποΈ bye girl, you did great.SQLITE3_EXEC(db_handle,SQL statement(s))runs one or more SQL statements that don't need parameters πββοΈ no params, no problem.SQLITE3_ROW_ARRAY(st_handle)returns anARRAYwith a row of statement results, or it fails πSQLITE3_COLUMN_NAMES_ARRAY(st_handle)returns anARRAYwith the SQL statement result column names, or it fails π·οΈSQLITE3_ROW_TABLE(st_handle)returns aTABLEwith statement results indexed by column name, or it fails ποΈ this one's the main character ngl.
π SEE ALSO π
and that's the whole page bestie, we ate and left absolutely zero crumbs πβ¨ this was CSNOBOL4B 2.3.1, dated March 31, 2022 β so like, a lil vintage, but the vibe is timeless π mwah, go query something ππ
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms