Closed 123FLO321 closed 5 years ago
Added support for mysql_set_server_option
mysql_set_server_option
Example:
let mysql = MySQL() mysql.connect(host: host, user: username, password: password, db: database) mysql.setServerOption(.MYSQL_OPTION_MULTI_STATEMENTS_ON) let sql = """ INSERT INTO test (field1, field2) VALUES ("Hello", "World"); INSERT INTO test (field1, field2) VALUES ("World", "Hello"); """ mysql.query(statement: sql)
If MYSQL_OPTION_MULTI_STATEMENTS_ON is not set (or MYSQL_OPTION_MULTI_STATEMENTS_OFF is set again) this sql will throw an error as usual.
MYSQL_OPTION_MULTI_STATEMENTS_ON
MYSQL_OPTION_MULTI_STATEMENTS_OFF
This feature allows for example the creation of TRIGGERs in Perfect-MySQL
TRIGGER
Added support for
mysql_set_server_option
Example:
If
MYSQL_OPTION_MULTI_STATEMENTS_ON
is not set (orMYSQL_OPTION_MULTI_STATEMENTS_OFF
is set again) this sql will throw an error as usual.This feature allows for example the creation of
TRIGGER
s in Perfect-MySQL