Storages
Returns a list of stock arrival (receiving) records for purchase orders.
テーブル固有の情報
SELECT
本製品 は Smaregi API を使用してWHERE 句条件を処理します。すべてのカラムは=、!=、>、<、>=、<= 演算子によるサーバー側フィルタリングをサポートし、文字列型のカラムはLIKE もサポートします。IN 演算子、およびdate/datetime 型のカラムに対するLIKE 演算子は、クライアント側で処理されます。
例えば、次のクエリはサーバー側で処理されます:
SELECT * FROM Storages WHERE StorageId = 3
SELECT StorageInfoId, SupplierId, StorageStoreId, StorageExpectedDateFrom FROM Storages WHERE StorageId = 3
INSERT
Storages を追加するには、SupplierId、StorageStoreId およびDetailAggregate フィールドを指定します。
一時テーブルを使用する場合:
INSERT INTO StorageDetails#TEMP (productId, inspectionQuantity) VALUES (1, 4)
INSERT INTO Storages (SupplierId, StorageStoreId, DetailAggregate) VALUES (1, 1, 'StorageDetails#TEMP')
集計を使用する場合:
INSERT INTO Storages (StorageId, StorageInfoId, SupplierId, StorageStoreId, Memo, DetailAggregate) VALUES (21, 2, 1, 1, 'chand2233445', ' {
"table_name": "StorageDetail",
"rows": [
{
"productId": "5",
"inspectionQuantity": "3"
}
]
}
')
Note: 同じキーを持つレコードが既に存在する場合、挿入は失敗し、ドライバーは影響を受けた行数として0 を返します。
UPSERT
このテーブルでは、UPSERT はサポートされていません。
UPDATE
Smaregi はStorageInfoId、SupplierId、StorageStoreId、StorageExpectedDateFrom、StorageExpectedDateTo、StorageDate、Memo、Status、IdentificationNo、Token およびDetailAggregate カラムの更新を許可します。
UPDATE Storages SET Memo = 'updated2' WHERE StorageId = 18
DELETE
このテーブルでは、DELETE はサポートされていません。
Columns
| Name | Type | ReadOnly | References | Description |
| StorageId [KEY] | Integer | False | ||
| StorageInfoId | Integer | False |
StorageInfo.StorageInfoId | |
| SupplierId | Integer | False | ||
| StorageStoreId | Integer | False | ||
| StorageExpectedDateFrom | Date | False | ||
| StorageExpectedDateTo | Date | False | ||
| StorageDate | Date | False | ||
| Memo | String | False | ||
| Status | Integer | False | ||
| IdentificationNo | String | False | ||
| Modified | Datetime | True | ||
| Token | String | False | ||
| DetailAggregate | String | False |
A JSON aggregate of details associated with the storage. |