Class RuntimeDatabaseService
java.lang.Object
io.github.protasm.jvmud.storage.jdbc.RuntimeDatabaseService
JDBC-backed database handle manager for JVMud-native database efuns.
The service intentionally exposes JVMud operations such as jvmud_db_exec rather than
legacy driver names. Mudlib compatibility objects can translate spellings like db_exec
onto these methods while JVMud owns only the generic runtime contract: handles identify open
connections, one result cursor is retained per handle, SQL errors are queryable, and fetched rows
are returned as LPC arrays. JDBC binary text values are decoded as UTF-8 LPC strings rather than
exposing Java byte-array identities to mudlib code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintclose(int handle) Closes an open handle and returns LPC status.voidConfigures the JDBC connection settings used by subsequent database connections.intOpens a connection and returns its positive handle, or0when no JDBC URL is configured.error(int handle) Returns the last SQL error for an open handle, or LPC false when no error is pending.Escapes backslashes and single quotes for compatibility SQL text interpolation.intExecutes one SQL statement against an open handle and returns that handle on success.fetch(int handle) Fetches the next row from the handle's current result cursor, or LPC false when exhausted.handles()Returns the currently open database handles as an LPC array.
-
Constructor Details
-
RuntimeDatabaseService
public RuntimeDatabaseService()
-
-
Method Details
-
configure
-
connect
-
execute
Executes one SQL statement against an open handle and returns that handle on success. -
fetch
Fetches the next row from the handle's current result cursor, or LPC false when exhausted. -
error
Returns the last SQL error for an open handle, or LPC false when no error is pending. -
close
public int close(int handle) Closes an open handle and returns LPC status. -
handles
-
escape
-