Data Service memungkinkan Anda membuat API dalam wizard mode atau script mode. Dalam wizard mode, Anda dapat mengonfigurasi API secara visual tanpa menulis kode. Di sisi lain, script mode memungkinkan Anda menulis kueri SQL sendiri untuk API serta mendukung fitur seperti penggabungan tabel ganda, kueri kompleks, dan fungsi agregat. Topik ini menjelaskan fitur-fitur yang didukung saat membuat API dalam kedua mode tersebut.
Berikut adalah perbedaan antara membuat API dalam wizard mode dan membuat API dalam script mode:
|
Category |
Feature |
Wizard mode |
Script mode |
|
Query object |
Query a single table in a single data source |
Supported |
Supported |
|
Query joined tables in a single data source |
Not supported |
Supported |
|
|
Query condition |
Exact numeric match |
Supported |
Supported |
|
Numeric range query |
Supported |
Supported |
|
|
Exact string match |
Supported |
Supported |
|
|
Fuzzy string match |
Supported |
Supported |
|
|
Query result |
Return field values as is |
Supported |
Supported |
|
Perform mathematical operations on field values |
Not supported |
Supported |
|
|
Apply aggregate functions to field values |
Not supported |
Supported |
|
|
Paginate returned results |
Supported |
Supported |
|
|
Query logic |
MyBatis tags |
Not supported |
Supported |