SQL column definition
Each SQL column need to be declared in the database schema.
In an SQL table definition, the
"cols"
JSON objects must define the following properties:name
: The name of the SQL column,fgltype
: The SQL type, in FGL syntax,not_null
: Not null constraint,default
(optional): A default value
The next example shows the list of columns of a "employee"
table:
"cols": [
{
"name": "employee_id",
"fgltype": "INTEGER",
"not_null": true
},
{
"name": "emp_name",
"fgltype": "VARCHAR(50)",
"not_null": true
},
{
"name": "emp_shop",
"fgltype": "INTEGER",
"not_null": true
},
{
"name": "emp_picture",
"fgltype": "BYTE",
"not_null": false
},
{
"name": "emp_comment",
"fgltype": "TEXT",
"not_null": false
}
]