QueryResults Output Object (Select-WooCommerce Cmdlet)
クエリの結果。
Syntax
PSObject QueryResultsRemarks
検索を実行すると、結果がPSObject のパイプラインに一度に一行ずつ返されます。各行オブジェクトは対応する値を持つテーブルのカラムを含みます。行オブジェクトにはテーブルと接続も含まれ、パイプライン経由でこれらの値をほかのcmdlet に簡単にインプットできます。以下に、JSON 形式の行オブジェクトの例を示します。
PS C:\> $conn = Connect-WooCommerce -ConsumerKey 'ConsumerKey' -ConsumerSecret 'ConsumerSecret' -Url 'http://localhost/woocommerce/'
PS C:\> $row = Select-WooCommerce -Connection $conn -Table "Orders" -Columns (ParentId, Total) -Where "ParentId = '3'" | select -first 1
PS C:\> $row | ConvertTo-Json
{
"Connection": {
},
"Table": "Orders",
"Columns": [
],
"ParentId": "MyParentId",
"Total": "MyTotal"
}