Common issues for CLAPI usage
This example contains many of the common issues for CLAPI usage.
When the Lookup Table API returns configuration details from an advanced table lookup, it has been reported that it works when the table is basic. An advanced lookup table does not return configuration details.
Usage:
Currently, all the .tbl file configuration details can be saved and retrieved through:
- /api/site/{siteName}/lookuptable/{tableName}/get
- /api/site/{siteName}/lookuptable/{tableName}/save
These use the same class: CloverTblConfig
.
Here are two different inputs:
- A basic lookup table instance with a SQL statement: How to distinguish the
basic and advanced modes.
The "
dbTable
" entry has marked that in basic mode, the input JSON data requires a “dbTable
” key-value. For example:{. . . . "dbConnection": "sqltest", "dbTable": "1bats_sqlserver", "dbsql": "SELECT Flag FROM 1bats_sqlserver WHERE CreateDate=<CreateDate", "isProcedure": false, . . . . "procedureType": "0" }
In advanced mode, it must not include this key. For example:
{. . . . "dbConnection": "ora_conn_10g", "dbsql": "{call ZOE_11312_SELECTMULTI(<i_a1, <i_a2, o_a3 OUT, o_a4 OUT, o_a5 OUT)}" "isProcedure": true, . . . . "procedureType": "1" }
-
This is an advanced table instance with a
StoredProcedure
type. To get the procedure type, use a SQL statement or stored procedure.The
isProcedure
andprocedureType
keys determine whether the type is a SQL statement or stored procedure.- If it is a SQL statement, then:
isProcedure:“false”
ProcedureType:“0”
- If it is a stored procedure, then:
isProcedure:“true”
ProcedureType:“1”
- If it is a SQL statement, then: