Since they are essentially direct mappings of their Java counterparts, I refer you to the official javadocs, which contain a list of the available methods:įrom these lists, the following methods are not (yet) supported: These methods are available after a query has been executed. myDB:disconnect(), where "myDB" is the connection-object and "disconnect()" one of the following methods. Since a connection-object is a lua table, call these functions via a colon, like e.g. The rest of these functions are available for each created connection-object. (default = false)ĬcDB.setDebug( true/false ) - Enables debug mode, which prints stack traces (very detailed error messages) to the Forge logfile. Returns a table through which all functions of the connection can be accessed.ĬcDB.disconnectAll( ) - Disconnects all database connections.ĬcDB.getVersion( ) - Returns the peripheral version as a string.ĬcDB.getDebug( ) - Returns true if debug mode is enabled false otherwise. It essentially works like the Java-methods of the java.sql package, with the exception of as few methods which I had to customize in order to make them work with ComputerCraft's Lua.ĬcDB.getNewConnection( url, user, password ) - Establishes a new database connection. Don't extract it, simply put it into the mods folder as well. I recommend doing it the former way though, as that loads the drivers together with Minecraft instead of having Forge inject them during the mod loading process. If you are on Windows, then it should be %appdata%\.minecraft\mods\ JAR driver file into your Minecraft's mods folder.
0 Comments
Leave a Reply. |