Classes¶
Here we have listed all classes with their parameters and returned value and how to use them.
SHORTLY : Fast & Small document of all classes!
How to load and use classes?¶
All classes have their own namespace and each one is in the file named as their name. You can load classes with calling them on top of your codes.
Step By Step - Define Method¶
- We
include
jsondb file witch automatically load classes by their definition on codes! - We define class on top of codes. (For example :
USER
) - We call to class defined on top of code.
- Now we can call any function from class and use it.
Step By Step - Direct Method¶
- We
include
jsondb file witch automatically load classes by calling them on codes! - We call to class with full namespace.
- Now we can call any function from class and use it.
List of Classes¶
JSONDB\lib\connect¶
Info
This class is only for verify the server and create connection to server. Other classes don't work without accepting and connecting to server by this class!
Functions | Parameters | Description |
---|---|---|
------- | ----------------- | ------------------------------------------ |
JSONDB\request\user¶
Functions | Parameters | Description |
---|---|---|
rapid_login |
$save_sessionboolean |
Send a rapid login request to jsondb server/host. |
login |
$save_sessionboolean |
Send a login request to jsondb server/host. In this method of login it takes a little more time to login |
continue |
$session_idstring /null |
Continue last login using last session id or entered session id |
terminate |
---------------------- | Terminate current session id (if you use this function you must login again) |
update |
$what , $set , $usernamestring /array , string /array , string /null |
Update current or another user info |
get |
$whatstring /array |
Get current user info |
create |
$username , $password , $type , $activestring , string , string , boolean |
Get current user info |
delete |
$usernamestring |
Delete a user |
JSONDB\request\database¶
Functions | Parameters | Description |
---|---|---|
select |
$namestring |
Select a database |
build |
$name , $maxsize , $maxbase , $users , $comment , $encrypt , $selectstring , integer , integer , array /null , string /null , boolean , boolean |
Build a new database |
modify |
$what , $setstring /array , string /array |
Modify database setting |
obtain |
$whatstring /array |
Obtain database setting |
delete |
$what , $set , $usernamestring /array , string /array , string /null |
Delete current selected database |
clean |
$whatstring /array |
Clean current selected database |
export |
$save_file , $path_to_saveboolean , string /null |
Export current selected database |
import |
$sourcestring |
Import a database |
JSONDB\request\base¶
Functions | Parameters | Description |
---|---|---|
select |
$namestring |
Select a base |
create |
$name , $maxrecord , $comment , $encrypt , $selectstring , integer , string /null , boolean , boolean |
Create a new base |
modify |
$what , $setstring /array , string /array |
Modify base setting |
obtain |
$whatstring /array |
Obtain base setting |
delete |
$what , $set , $usernamestring /array , string /array , string /null |
Delete current selected base |
clean |
$whatstring /array |
Clean current selected base |
export |
$save_file , $path_to_saveboolean , string /null |
Export current selected base |
import |
$sourcestring |
Import a base |
JSONDB\request\datacenter¶
Functions | Parameters | Description |
---|---|---|
replace |
$object , $value , $where_object , $where_value , $limitstring /array , string /array , string /array /null , string /array /null , integer /null |
Replace/add data to record(s) |
receive |
$object , $where_object , $where_value , $limitstring /array , string /array /null , string /array /null , integer /null |
Receive data from record(s) |
add |
$object , $valuestring /array , string /array |
Add a record |
delete |
$id , $where_object , $where_value , $limitinteger /array /string , string /array /null , string /array /null , integer /null |
Delete record(s) |
remove |
$object , $where_object , $where_value , $limitstring /array , string /array /null , string /array /null , integer /null |
Remove data from record(s) |