en:db_api
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:db_api [2026/06/03 09:47] – administrator | en:db_api [2026/06/05 07:14] (current) – administrator | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| ===== iGarment API: Query ===== | ===== iGarment API: Query ===== | ||
| Line 36: | Line 36: | ||
| Example, single SQL | Example, single SQL | ||
| - | |||
| | | ||
| | | ||
| - | |||
| Return data | Return data | ||
| Line 63: | Line 61: | ||
| Example, multiple select | Example, multiple select | ||
| - | SELECT * FROM table1; | + | |
| - | SELECT * FROM table2; | + | SELECT * FROM table2; |
| You should get the select data of ' | You should get the select data of ' | ||
| Line 70: | Line 68: | ||
| Example, multple select return mutlipe dataset | Example, multple select return mutlipe dataset | ||
| - | SELECT * FROM table1 into table1; | + | |
| - | SELECT * FROM table2; | + | SELECT * FROM table2; |
| The return data will be a list of two elements with the following structure. | The return data will be a list of two elements with the following structure. | ||
| Line 87: | Line 85: | ||
| You may also store data into temporay table to be used by subsequence select. | You may also store data into temporay table to be used by subsequence select. | ||
| - | ~~~sql | + | |
| - | SELECT * FROM table1 INTO TEMPORARY TABLE T_A; | + | CREATE INDEX T_A_KEY1 ON (order); |
| - | CREATE INDEX T_A_KEY1 ON (order); | + | |
| + | SELECT * FROM table2 LEFT JOIN T_A WHERE T_A.order > 1000; | ||
| + | DROP INDEX T_A_KEY1; | ||
| + | |||
| + | ===== iGarment API: Get file ===== | ||
| - | SELECT * FROM table2 LEFT JOIN T_A WHERE T_A.order > 1000; | ||
| - | DROP INDEX T_A_KEY1; | ||
| - | iGarment API: Get file | ||
| API to download file. Supported method is GET. | API to download file. Supported method is GET. | ||
| Line 99: | Line 98: | ||
| < | < | ||
| - | Request Example | + | |
| + | **Request Example** | ||
| eg: get style image (example with trial505, https:// | eg: get style image (example with trial505, https:// | ||
| + | |||
| step 1. get real file name from system image table: ~/db/query | step 1. get real file name from system image table: ~/db/query | ||
| - | sql: select b.ImageType, | + | |
| return: | return: | ||
| [{ | [{ | ||
| Line 111: | Line 112: | ||
| " | " | ||
| }] | }] | ||
| + | | ||
| step 2. url: ~/ | step 2. url: ~/ | ||
| - | Return Example | + | **Return Example** |
| - | { | + | |
| " | " | ||
| " | " | ||
| " | " | ||
| # file data, encoded in Base64 | # file data, encoded in Base64 | ||
| - | } | + | |
| - | If file_type is blank, can get file type from system image table. | + | |
| + | '' | ||
en/db_api.1780480073.txt.gzip · Last modified: by administrator
