SNOBOL4SQLITE3(3)

πŸ“¦
version 2.3.1 Β· 3 versions
, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’Ύ 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 πŸ”₯ call SQLITE3_ROW_ARRAY() or SQLITE3_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 to NULL. 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, use sqlite3_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 an ARRAY with a row of statement results, or it fails πŸ“š
  • SQLITE3_COLUMN_NAMES_ARRAY(st_handle) returns an ARRAY with the SQL statement result column names, or it fails 🏷️
  • SQLITE3_ROW_TABLE(st_handle) returns a TABLE with 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