Skip to content

Releases: intercept/intercept-database

1.5.2

21 Jul 13:03
d4ebcef
Compare
Choose a tag to compare

Update Intercept again for compatibility with 2.13/2.14 game update.
Update Mariadb connector version
Fix missing mariadb plugins from last update

Edit: !!! I did a stoopy and put intercept_x64.dll into the zip. Don't use that, use https://steamcommunity.com/workshop/filedetails/?id=1645973522 instead, which contains the latest dll and is being kept up-to-date.

1.5.1

26 Apr 20:08
292040d
Compare
Choose a tag to compare

Same as 1.5, with updated mariadb connector and Intercept API version 3

1.5

07 Jul 16:15
8a31c38
Compare
Choose a tag to compare
1.5

Fixed binding null values on async query not working
Fixed handling of null values in result (would show the previous value of same column in a row where value is null)
Better handling and error reporting for bindValues (Throws error if invalid type was passed, and automatically converts array to string internally)
Added dbNull type (https://intercept-database.readthedocs.io/en/latest/api/results.html#dbnull)

1.4

03 Jul 14:39
1d21a30
Compare
Choose a tag to compare
1.4

Added blob support for dbToParsedArray
Added ability to bind null values (nil/objNull/ctrlNull/whateverNull binds to null SQL value)
Fixed ToParsedArray not properly parsing quoted strings
Added parseDateType config option
Added parseTinyintAsBool config option
Added ability to specify per-statement config options
Added dbGetBoundValues command

1.3

31 May 16:39
2c12107
Compare
Choose a tag to compare
1.3

Fixed prepared statement leak

1.2

04 May 15:50
5388fc2
Compare
Choose a tag to compare
1.2

Fixed crash if number of provided bind values doesn't match expected number (now throws script error)
Fixed crash on race condition in async queries (async queries randomly crashed arma)
Fixed TEXT types being ignored in results
Fixed crash on DATETIME with null value (in general null values will now be better supported, return "NULL" now)

1.1

25 Apr 17:35
61c5224
Compare
Choose a tag to compare
1.1

Fixed dbPing crashing the game (soooorry that it took so long :D)
Added error handling in lots of places, some invalid things now throw script errors like normal SQF commands would do too.
Added config option to disable creating queries in scripts, meaning you can only load statements from config if it's enabled
Added dbLoadSchema command which executes a sql file which can be defined in config.

1.0

31 Mar 17:40
943d256
Compare
Choose a tag to compare
1.0

Added dbPing command
Added dbIsConnected command
Added dbResultToParsedArray command
Added dbAddErrorHandler command
Added dbVersion command
Stringified query variable now returns query content.
Plugin dll is now signed.

Fixed force crash on failed query

21 Feb 11:52
Compare
Choose a tag to compare

If a async query failed the code would debugbreak instead of logging the error

RC4

13 Jan 17:11
Compare
Choose a tag to compare
RC4 Pre-release
Pre-release

New stuff:

dbCreateConnection "configname"
dbPrepareQueryConfig "configname"
dbPrepareQueryConfig ["configname", [binding1, binding2, ...]]
dbPrepareQuery ["INSERT ....", [binding1, binding2, ...]]
dbReloadConfig
accounts:
 maindb: #production db, don't break things here!
  ip: 127.0.0.1
  username: root
  password: lulz
  database: production
  port: 3306 #optional
 testdb: #testserver
  ip: 127.0.0.2
  username: root
  password: lulz
  database: production
  port: 3306 #optional

statements:
 insertStuff: INSERT INTO table (a,b,c) VALUES (?,?,?)
 deleteStuff: DELETE FROM table WHERE a=?
_connection = dbCreateConnection "testdb";
_query = dbPrepareQueryConfig ["deleteStuff", [15]];
_connection dbExecuteAsync _query;

All commands renamed from db_stuff to dbStuff
db_query renamed to dbExecute

DB_Connection = dbCreateConnection ["ip", 3306, "user", "password", "db"];
_query = dbPrepareQuery 'SELECT intel_missionen.`name` FROM intel_missionen WHERE intel_missionen.id > ?';
_query dbBindValue 400;
_result = DB_Connection dbExecuteAsync _query;

_result db_bindCallback [{
	params ["_result", "_args"];

	DB_RES = [dbResultToArray _result, _args];
	systemChat "got result!";
}, 1];
DB_Connection = dbCeateConnection ["ip", 3306, "user", "password", "db"];

[] spawn {
	Sleep 5;
	_query = dbPrepareQuery 'SELECT intel_missionen.`name` FROM intel_missionen WHERE intel_missionen.id > ?';
	_query dbBindValue 400;

	_start = diag_tickTime;

	_result = DB_Connection dbExecute _query;
	
	systemChat str ["got result!", diag_tickTime - _start];

	DB_RES = [dbResultToArray _result];
};