Commit graph

10 commits

Author SHA1 Message Date
Eric Lippmann
7c068d4adf Use icinga-go-library 2024-05-24 09:56:28 +02:00
Eric Lippmann
9eddcac7fb icingadb-migrate: Don't alias types import 2024-05-22 11:51:21 +02:00
Eric Lippmann
f54a142815 Move icingadb#DB to database#DB 2024-05-22 11:51:21 +02:00
Eric Lippmann
75501e11f8 Move database related contracts to database/contracts 2024-05-22 11:51:21 +02:00
Eric Lippmann
7b537661ee Move icingadb/objectpacker to objectpacker 2024-05-22 11:51:21 +02:00
Yonas Habteab
eaf9744f16 Move pkg/driver to pkg/icingadb/driver.go 2024-03-28 13:19:44 +01:00
Julian Brost
71c1d2fa4d Migration: refactor output/processing of converted entities
This commit simplifies the `icingaDbOutputStage` type to contain only one
entity slice to be insert/upsert. This allows to simplify the handling in
`migrateOneType()` by removing nested loops.

Additionally, a bit of code inside that function is outsourced into a new
`utils.ChanFromSlice()` function. This makes the body of the loop over the
insert/upsert operation (the loop using the `op` variable) simple enough so
that it can just be unrolled which saves the inline struct and slice definition
for that loop.
2023-07-31 11:10:42 +02:00
Alexander A. Klimov
a778fc8d34 migrateOneType(): allow multiple stages of INSERT IGNORE, UPSERT
Refactor the converters so they can signal the caller to behave not as usual
i.e. not to INSERT IGNORE everything, then UPSERT everything.
2022-12-19 16:07:53 +01:00
Alexander A. Klimov
cfaee2e3d4 cmd/icingadb-migrate: avoid unnecessary config option
for columns which are NULLable anyway.
2022-11-07 12:35:31 +01:00
Alexander A. Klimov
6a5f3fd02f cmd/: rename ido2icingadb/ to icingadb-migrate/ 2022-10-26 11:18:52 +02:00
Renamed from cmd/ido2icingadb/misc.go (Browse further)