Skip to content

Module: Vehicle

Aviril edited this page Oct 11, 2021 · 22 revisions

━ dbify.vehicle.fetchAll()

@Objective: Fetches all existing vehicles.
dbify.vehicle.fetchAll(callback(result, arguments)
    print(toJSON(result))
    print(toJSON(arguments))
end, ...)

━ dbify.vehicle.add()

@Objective: Adds a new vehicle.
dbify.vehicle.add(vehicle, callback(vehicleID, arguments)
    print(tostring(vehicleID))
    print(toJSON(arguments))
end, ...)

━ dbify.vehicle.delete()

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

━ dbify.vehicle.setData()

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

━ dbify.vehicle.getData()

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