db

db:ignore_cache

Ignore the built-in cache system of the database

db:tables

Holds all database tables defined in sunsed.json

db:create_table

Create a table with an ID as PRIMARY, BIGINT(20), NOT NULL, AUTO_INCREMENT

db:select

Select records from database.

db:select_one

Select records from database.

db:get

Get a single given column from a table, return false if data not found

db:delete

Delete rows from using given $where and return the number rows deleted

db:delete_one

delete a maximum of one record of a given table using given $where clause and return number of records deleted (0 or 1)

db:count

Count number of rows in given table with given where conditions

db:avg

Get average value for a column

db:insert

Insert new records in table

db:has?

Question whether given table has specific data

db:list

return given column as an array of items

db:escape

Escapes data to be included in a SQL query

db:escape_column_or_table_name

Escape db column or table name

db:describe_table

Describe a table and return SQL query result array

db:update

update any number of records of a given table using given $where clause and then return number of rows affected

db:update_one

update maximum of one record of a given table using given $where clause and return number of records updated (0 or 1)

db:query

Query multiple rows from the Database

Copyright ©2013-2022 SunSed®. All rights reserved.