These functions are introduced in some videos.
- Login and Logout
- Upload your CSV file for creating a new table in your database
- See your tables and Jetelina-API
- Select columns in your tables for creating your Jetelina-API
- Test your new SQL that is to be Jetelina-API
- Create Jetelina-API
- Test Jetelina-API
- Delete Jetelina-API
- Drop table in your database
- Switch a database
- Some statistical data
- Login and Logout
You always start with greeting ‘hi’ in Jetelina’s chat box. Then, Jetelina simply asks your name that is registered in there.
Type ‘bye’, ‘logout’ or ‘have a good day’ …. and so on into the chat box, if you log out Jetelina. - Upload your CSV file for creating a new table in your database
Your CSV file is to be a source of a new table. I mean, Jetelina creates a new table in your database from your uploading CSV file. The CSV file has been demanded some rules so that Jetelina can understand it.
I) CSV file name is to be the new table name
II) must have ‘column’ name in the first line of the CSV file
III) the delimiter for data is a comma (,)
for example, in ‘ftest.csv’ file is alike,
name,sex,age
Jake,male,27
Cecil,female,28
.
.
The file name ‘ftest.csv’ is to be the new table name. ← rule(I)
The first line strings (name,sex,age) are to be the column name. ← rule(II)
The data (Jake,male,27….) are delimited by comma. ← rule(III)
These data is processed in a SQL sentence, in case of RDMBS,
create table ftest (ftest_name varchar, ftest_sex varchar, ftest_age integer);
insert into ftest (ftest_name,ftest_sex,ftest_age) values(‘Jake’,’male’,27);
In consequence, the new ‘ftest’ table that is created by uploading ‘ftest.csv’ is like shown below.
table name: ftest
|ftest_jt_id|ftest_name | ftest_sex | ftest_age | ftest_jetelina_delete_flg |
| 1 | Jake | male | 27 | 0 |
| 2 | Cecil | female | 28 | 0 |
* ‘ftest_jt_id’ and ‘ftest_jetelina_delete_flg’ are created automatically by Jetelina.
You see the column names are ‘ftest_***’, not ‘name’. This is because Jetelina secures its uniqueness. I mean, each of the column names is to be the name that is combined with its file name.
How to upload a CSV file to Jetelina? It is very simple, you type ‘file open’, ’open filebox’, ’csv file’, ’file upload’ and so on, in the chat box. Jetelina works for you as far as it can understand your order. Then you select your upload file in the opening file list , and type ‘upload’, ’fileup’ or simply ‘up’ and so on to execute uploading it to Jetelina. Jetelina executes creating table and inserting data to the new table if the uploading would be succeeded. You may receive some error messages in the chat box if your CSV file was out of the rules. Fix it due to the message and try again, if you had that.
You will see the new table name and new Jetelina-API numbers that are named ‘ji*'(for inserting),’ju*'(for updating) and ‘jd*'(for deleting) if all executions are successful.
You see some unfamiliar columns, ‘jt_id’ and ‘jetelina_delete_flg’, in the new table. These are created automatically by Jetelina.
’jt_id’ data type is ‘integer’: expresses sequence Number in the table, I mean every data has unique ID by this. ‘jetelina_delete_flg’ data type is ‘boolean’: ‘jd*’ and ‘js*’ Jetelina-API handle only true data in this column. This column data can be updated by using ‘jd*’ Jetelina-API.
Note:
Again. These columns are created by Jetelina, when you upload your CSV file to Jetelina. You may have to add these columns manually if you create a new table on your own. - See your tables and Jetelina-API
You can manipulate your new table and create Jetelina-API. You type ‘select’ and/or ‘open’ for pointing table and Jetelina-API, I mean, e.g. in case of ftest table, ‘select ftest’ or ’open ftest’, and ’select ji*’ and ‘open ji*’ are for Jetelina-API. Type only the Jetelina-API number works fine, e.g. type ‘select 10’ for pointing ‘ji10’, ‘ju10’, ‘jd10’ or ‘js10’.
A requested table shows you its columns. These shown column names are added its table name at the head, so that you can identify them. A requested Jetelina-API shows you its JSON IN/OUT form that is managed via the internet, and also the internal execution SQL sentence for your understanding. I mean, you will get the result data with JSON OUT form as far as you send your request with JSON IN form to Jetelina. - Select columns in your tables for creating your new Jetelina-API
By uploading your CSV file, Jetelina creates some Jetelina-API automatically: insertion, updating and deleting. But selection Jetelina-API should be created by your hand.
The process is like this,
i. open the table
ii. select columns on the display
iii. describe its subquery if you needed (e.g. where ftest_age < 40)
iv. test it before creating: strongly recommend
v. then create Jetelina-API by posting
The (ii) is explained below. The (i) was already talked in 3. About the (iii) is to be later.
Here is about how to do (ii).
For selecting a column, you just type ‘select’ with a column name that are displayed, like ‘select ftest_name’ ( just the column name). The requested column moves to the bottom zone on the display, it mean ‘selected’. You also can type ‘select all’ to select every column at once. You may wonder if there were similar column name in the list, for example ‘ftest_name’ and ‘ftest_nick_name’. In such a case, ‘select name’ are selected at once.
To reverse or cancel them, type ‘remove’, ’reject’ and ‘cancel’ work for it, e.g. ‘remove ftest_name’ is that for. Of course ‘reject all’ works as your expectation. - Test your new SQL that is to be Jetelina-API
You can test your Jetelina-API (indeed SQL sentence) .
It is very simple, but should take care of your subquery sentence. I mean, the subquery has to follow some rules,
i. column name should follow the displayed one. e.g. ftest.ftest_name
ii. a condition in it also should follow the column type. e.g. ftest.ftest_name = ‘Jake’, because it is defined as ‘varchar’ data type in the column.
Type ‘test sql’, ’do sql test’ or ‘check sql’ and so on to excute the SQL sentence. Jetelina displays the result if it would succeed.
The result shows your expect-able acquired data numbers and response data in JSON OUT form.
Attention, this result is limited only 10 data. - Create Jetelina-API
Now you are ready for creating your own Jetelina-API. You only are able to create ‘js*'(selecting) Jetelina-API. Others, named ‘ji*'(inserting),’ju*'(updating) and ‘jd*'(deleting) are created in 2 by Jetelina. To create ‘js*’, just type ‘create api’, ’post columns’ and so on. You should review your subquery once more if you set it, before type these command in the chat box.
e.g.
if you wanna select data order by ‘ftest_name’ and you may set it in the subquery in the case of test sql as
where ftest.ftest_name = ‘Jake’
this is good to see the SQL sentence would work fine.
But in case of fetching general data, you should rewrite it as
where ftest.ftest_name = ‘{ftest_name}’
You see ‘{name}’ is the symbol of general data. Indeed this ‘{name}’ is changeable whatever you want. I mean, this field paramter is refrected in ‘IN’ JSON from. Other word, ‘IN’ parameter are adopted these names. Therfore you can set your own name in the query sentence.
Even thoung, there are a few rules in naming of the variable parameter,
i. enclose with curly brackets
ii. set an unique name in the brackets, a same name with the column is recommended
iii. enclose with apostrophe(‘) if it were a string data
e.g.
ftest_name:string → ‘{ftest_name}’
where ftest.ftest_name = ‘{ftest_name}’
ftest_age:integer → {ftest_age}
where ftest.ftest_age < {ftest_age};
* you see there are not apostrophe(‘) for {ftest_age}, because it is integer data. - Test Jetelina-API
All Jetelina-API can be tested before&after you use it via the internet.
At the first, select Jetelina-API which you want to execute on Jetelina, ref. 3, Jetelina shows you JSON IN/OUT form and execution SQL sentence of the selected Jetelina-API.
Next,
i. Type ‘test api’, ‘api test’ or ‘do test’ and so on into the chat box
ii. Jetelina asks you a value of the variable parameters if it needed
iii. Type the value into the chat box. This value is put into JSON IN form immediately
iv. After all parameters are set, Jetelina tell you how to execute the test. You type something due to Jetelina’s word.
v. The result of the execution is displayed in JSON OUT form.
vi. Finally, type ‘thank you’ into the chat box, to let know your action have finished to Jetelina.
Alternative:
Jetelina has this test page in HTML. See it in Tips page, ‘Test page in HTML for your Jetelina-API‘. - Delete Jetelina-API
You only can delete ‘js*’ Jetelina-API by yourself, others: ‘ji*’, ‘ju*’ and ‘jd*’ are not able to do by yourself. These are deleted when the table is dropped, ref. 9.
Type ‘delete api js*’, ’remove api js*’ and ‘reject api js*’ into the chat box to delete your Jetelina-API. Then, Jetelina asks you your original pass phrase. You can type something your favorite string in to there if this is the first time your deleting request. But this pass phrase must need to match with the last time if you had already executed this function. I mean, the pass phrase which had been typed in the first time is stored in your user account as your original information. This pass phrase is not able to be updated, ref. use management. And this pass phrase is alive during your log in. So Jeteilna will not ask it again in the consecutive actions.
This deleting is irreversible.
Attention:
Jetelina-API deleting is allowed to ‘admin’ and ‘manager’ account, you can see your ‘roll’ by typing ‘who am i’ into the chat box. - Drop table in your database
Dropping table is similar with deleting Jetelina-API.
For example for dropping ‘ftest’ table, type ‘drop table ftest’, ’table drop ftest’ into the chat box. Then, you see the pass phrase as same as the action of deleting Jetelina-API. Please refer 8 again.
Some Jetelina-API that is related with this table, ‘ji*’, ’ju*’, ‘jd*’ and ‘js*’ are deleted at the same time.
Attention:
Table dropping is allowed to only ‘admin’ account, you can see your ‘roll’ by typing ‘who am i’ into the chat box. - Switch a database
Jetelina can manage multi-database. Jetelina try to connect to a database that you request, if its connection had not established yet. Then, Jetelina shows its icon with hi-lighting if the trying succeeded. In case of failure, Jetelina shows you the connection parameters that are using to try. Confirm and chenge some parameters if you need, then try again.
In the case of you have already established their connections, its icon is already displayed. To switch a database, simply type ‘change database’, ’change data base’ and so on into the chat box. Jetelina asks you ‘which database?’, you type database name into the chat box. Or more directly ‘switch to mysql’ or maybe just ‘mysql’ is been acceptable. The switched database is hi-lighten on the screen. - Some statistical data
Jetelina provides you some analyze data: Jetelina-API access numbers, database access numbers and Jetelina-API execution speed data.
It is too much volume to describe in this page. Please refer here to know how to use them.