Skip to content

Functions

Here we told about usage of classes functions and their parameters.

SHORTLY : Full document of how to use and pass parameters of classes functions!

How to pass class parameters?

First we have defined a comment for each parameter and we told type of value can be pass in this parameter else you can find any function of any class parameter in THIS PAGE

JSONDB\request\user

USER::RAPID_LOGIN()

Function Return Description
rapid_login string Send a rapid login request to jsondb server/host.
Parameters Type Description
$save_session string Should library save your session created for next times

Note

If request successfully session id returned else error returned witch depends on your output selection in illuminating class

USER::LOGIN()

Function Return Description
login array/json/object Send a login request to jsondb server/host.
Parameters Type Description
$save_session string Should library save your session created for next times

USER::CONTINUE()

Function Return Description
continue string Continue last login using last session id or entered session id
Parameters Type Description
$session_id string If set this param library use it for each request and login else it will be check any valid session id saved from last requests

USER::TERMINATE()

Function Return Description
terminate array/json/object terminate current session (if you use this function you must login again)
Parameters Type Description
----------------- ----------------- ----------------------------------

USER::UPDATE()

Function Return Description
update array/json/object Update current or another user info
Parameters Type Description
$what string/array Info you want to update it
$set string/array Value you want to set to that info
$username string If you want to update another user info (you must have higher permission than target user)

USER::GET()

Function Return Description
get array/json/object Get current user info
Parameters Type Description
$what string/array Info you want to get it

USER::CREATE()

Function Return Description
create array/json/object Create a new user
Parameters Type Description
$username string JSONDB account username
$password string JSONDB account password
$type string Permission type of new user ('admin','root')
$active boolean Should user be active or disable

USER::DELETE()

Function Return Description
delete array/json/object Delete a user
Parameters Type Description
$username string Username of that user

JSONDB\request\database

DATABASE::SELECT()

Function Return Description
select array/json/object Select a database
Parameters Type Description
$name string Name of database

DATABASE::BUILD()

Function Return Description
build array/json/object Build a new database
Parameters Type Description
$name string Name of database
$maxsize integer Limit max size of database in kilobyte
$maxbase integer Limit max base database allowed to have
$users array/null An array of users have access too this database
$comment string/null Comment of new database
$encrypt boolean Should database be encrypted
$select boolean Should database be selected after built

DATABASE::MODIFY()

Function Return Description
modify array/json/object Modify database setting
Parameters Type Description
$what string/array Setting you want to modify it
$set string/array Value you want to set to that setting

DATABASE::OBTAIN()

Function Return Description
obtain array/json/object Obtain database setting
Parameters Type Description
$what string/array Setting you want to obtain it

DATABASE::DELETE()

Function Return Description
delete array/json/object Delete current selected database
Parameters Type Description
----------------- ----------------- ----------------------------------

DATABASE::CLEAN()

Function Return Description
clean array/json/object Clean current selected database
Parameters Type Description
----------------- ----------------- ----------------------------------

DATABASE::EXPORT()

Function Return Description
export array/json/object Export current selected database
Parameters Type Description
$save_file boolean Should save exported database file
$path_to_save string Path to directory exported database file should save

DATABASE::IMPORT()

Function Return Description
import array/json/object Import a database
Parameters Type Description
$source string Json encoded format exported database

JSONDB\request\base

BASE::SELECT()

Function Return Description
select array/json/object Select a base
Parameters Type Description
$name string Name of base

BASE::BUILD()

Function Return Description
build array/json/object Create a new base
Parameters Type Description
$name string Name of new base
$maxrecord integer Limit max records count of base
$comment string/null Comment of new database
$encrypt boolean Should database be encrypted
$select boolean Should database be selected after built

BASE::MODIFY()

Function Return Description
modify array/json/object Modify base setting
Parameters Type Description
$what string/array Setting you want to modify it
$set string/array Value you want to set to that setting

BASE::OBTAIN()

Function Return Description
obtain array/json/object Obtain base setting
Parameters Type Description
$what string/array Setting you want to obtain it

BASE::DELETE()

Function Return Description
delete array/json/object Delete current selected base
Parameters Type Description
----------------- ----------------- ----------------------------------

BASE::CLEAN()

Function Return Description
clean array/json/object Clean current selected base
Parameters Type Description
----------------- ----------------- ----------------------------------

BASE::EXPORT()

Function Return Description
export array/json/object Export current selected base
Parameters Type Description
$save_file boolean Should save exported base file
$path_to_save string Path to directory exported base file should save

BASE::IMPORT()

Function Return Description
import array/json/object Import a base
Parameters Type Description
$source string Json encoded format exported base

JSONDB\request\datacetner

DATACENTER::REPLACE()

Function Return Description
replace array/json/object Replace/add data to record(s)
Parameters Type Description
$object string/array Name of data you want to add/update to record(s)
$value string/array Value of data you want to add/update to record(s)
$where_object string/array/null Filter records data name
$where_value string/array/null Filter records data value
$limit integer/null Limit number of records should update

DATACENTER::RECEIVE()

Function Return Description
receive array/json/object Receive data from record(s)
Parameters Type Description
$object string/array Name of data you want to receive from record(s)
$where_object string/array/null Filter records data name
$where_value string/array/null Filter records data value
$limit integer/null Limit number of records should receive

DATACENTER::ADD()

Function Return Description
add array/json/object Add a record
Parameters Type Description
$object string/array Name of data(s) you want to add
$value string/array Value of data(s) you want to add

DATACENTER::DELETE()

Function Return Description
delete array/json/object Delete record(s)
Parameters Type Description
$id integer/array/string Id of record(s) you want to delete
(if you want to delete all or delete by filtering set "*")
$where_object string/array/null Filtering records by data name
$where_value string/array/null Filtering records by data value
$limit integer/null Limit number of records should delete

DATACENTER::REMOVE()

Function Return Description
remove array/json/object Remove data from record(s)
Parameters Type Description
$object string/array Name of data you want to remove from record(s)
$where_object string/array/null Filter records data name
$where_value string/array/null Filter records data value
$limit integer/null Limit number of records should receive

Questions