-- name: ListInventory :many
SELECT * FROM "Inventory"
ORDER BY "Name";

-- name: GetInventoryByName :one
SELECT * FROM "Inventory"
WHERE "Name" = ? LIMIT 1;

-- name: CreateInventory :one
INSERT INTO "Inventory" (
    "Name", "Vcenter", "VmId", "EventKey", "EventId", "CreationTime", "ResourcePool", "VmType", "Datacenter", "Cluster", "Folder", "ProvisionedDisk", "InitialVcpus", "InitialRam", "SrmPlaceholder"
) VALUES(
    ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
RETURNING *;