database insert is working
Some checks failed
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-09-12 15:03:24 +10:00
parent 0d2f983eb3
commit 6b285e55b8
9 changed files with 165 additions and 28 deletions

View File

@@ -20,12 +20,12 @@ RETURNING Iid, Name, Vcenter, VmId, EventKey, EventId, CreationTime, DeletionTim
`
type CreateInventoryParams struct {
Name sql.NullString
Vcenter sql.NullString
Name string
Vcenter string
VmId sql.NullString
EventKey sql.NullString
EventId sql.NullString
CreationTime sql.NullString
CreationTime sql.NullInt64
ResourcePool sql.NullString
VmType sql.NullString
Datacenter sql.NullString
@@ -83,7 +83,7 @@ SELECT Iid, Name, Vcenter, VmId, EventKey, EventId, CreationTime, DeletionTime,
WHERE "Name" = ? LIMIT 1
`
func (q *Queries) GetInventoryByName(ctx context.Context, name sql.NullString) (Inventory, error) {
func (q *Queries) GetInventoryByName(ctx context.Context, name string) (Inventory, error) {
row := q.db.QueryRowContext(ctx, getInventoryByName, name)
var i Inventory
err := row.Scan(