Skip to content

Module: Character

Tron edited this page Oct 12, 2021 · 27 revisions

━ dbify.character.fetchAll()

@Objective: Fetches all existing characters.
dbify.character.fetchAll({
    --These are key datas to be used for the condition query (Optional)
    {key_columnName1, key_columnValue1},
    {key_columnName2, key_columnValue2},
    ...
}, callback(result, arguments)
    print(toJSON(result))
    print(toJSON(arguments))
end, ...)

━ dbify.character.create()

@Objective: Creates a new character.
dbify.character.create(character, callback(characterID, arguments)
    print(tostring(characterID))
    print(toJSON(arguments))
end, ...)

━ dbify.character.delete()

@Objective: Deletes an existing character.
dbify.character.delete(characterID, callback(result, arguments)
    print(tostring(result))
    print(toJSON(arguments))
end, ...)

━ dbify.character.setData()

@Objective: Sets character datas of a valid character.
dbify.character.setData(characterID, {
    --These are character datas to be updated
    {dataName1, dataValue1},
    {dataName2, dataValue2},
    ...
}, callback(result, arguments)
    print(tostring(result))
    print(toJSON(arguments))
end, ...)

━ dbify.character.getData()

@Objective: Retrieves character datas of a valid character.
dbify.character.getData(characterID, {
    --These are character datas to be retrieved
    dataName1,
    dataName2,
    ...
}, callback(result, arguments)
    print(toJSON(result))
    print(toJSON(arguments))
end, ...)
Clone this wiki locally