-
-
Notifications
You must be signed in to change notification settings - Fork 0
Module: Account
Аниса edited this page Dec 6, 2022
·
34 revisions
This module synchronizes built in MTA accounts w/ MySQL & provides a management interface to integrate w/ your resources. Module can either be used for custom accounts (Automated sync has to be disabled for this case) or work in correlation with default accounts otherwise (Automated sync has to be enabled for this case). For modifying automated sync's state refer.
Syntax #2 should only be used in conjunction w/ thread
--Syntax #1:
local bool: state = dbify.account.fetchAll(
table: {
--These are conditional datas that has to be used for the query
{string: columnName, ~: columnValue},
},
function: callback(table: result, table: arguments),
table: arguments
)
--Syntax #2:
local table: result, table: arguments = self:await(dbify.account.fetchAll(
thread: self,
table: {
--These are conditional datas that has to be used for the query
{string: columnName, ~: columnValue},
},
table: arguments
))
--Syntax #1:
local bool: state = dbify.account.create(
string: accountName,
function: callback(bool: result, table: arguments),
table: arguments
)
--Syntax #2:
local bool: result, table: arguments = self:await(dbify.account.create(
thread: self,
string: accountName,
table: arguments
))
--Syntax #1:
local bool: state = dbify.account.delete(
string: accountName,
function: callback(bool: result, table: arguments),
table: arguments
)
--Syntax #2:
local bool: result, table: arguments = self:await(dbify.account.delete(
thread: self,
string: accountName,
table: arguments
))
--Syntax #1:
local bool: state = dbify.account.setData(
string: accountName,
table: {
--These are columns that has to be updated w/ their respective values
{string: columnName, ~: columnValue},
...
},
function: callback(bool: result, table: arguments),
table: arguments
)
--Syntax #2:
local bool: result, table: arguments = self:await(dbify.account.setData(
thread: self,
string: accountName,
table: {
--These are columns that has to be updated w/ their respective values
{string: columnName, ~: columnValue},
...
},
table: arguments
))
--Syntax #1:
local bool: state = dbify.account.getData(
string: accountName,
table: {
--These are columns whose values are to be retrieved
string: columnName,
...
},
function: callback(table: result, table: arguments),
table: arguments
)
--Syntax #2:
local table: result, table: arguments = self:await(dbify.account.getData(
thread: self,
string: accountName,
table: {
--These are columns whose values are to be retrieved
string: columnName,
...
},
table: arguments
))