2024-12-18 18:54:48 +00:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// sqlc v1.27.0
|
|
|
|
|
|
|
|
|
|
package repository
|
|
|
|
|
|
2024-12-19 18:49:22 +00:00
|
|
|
import (
|
|
|
|
|
"database/sql/driver"
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Querytype string
|
|
|
|
|
|
|
|
|
|
const (
|
2024-12-24 17:13:48 +00:00
|
|
|
QuerytypeContextFull Querytype = "context_full"
|
2024-12-19 18:49:22 +00:00
|
|
|
QuerytypeJsonExtractor Querytype = "json_extractor"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (e *Querytype) Scan(src interface{}) error {
|
|
|
|
|
switch s := src.(type) {
|
|
|
|
|
case []byte:
|
|
|
|
|
*e = Querytype(s)
|
|
|
|
|
case string:
|
|
|
|
|
*e = Querytype(s)
|
|
|
|
|
default:
|
|
|
|
|
return fmt.Errorf("unsupported scan type for Querytype: %T", src)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NullQuerytype struct {
|
|
|
|
|
Querytype Querytype
|
|
|
|
|
Valid bool // Valid is true if Querytype is not NULL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Scan implements the Scanner interface.
|
|
|
|
|
func (ns *NullQuerytype) Scan(value interface{}) error {
|
|
|
|
|
if value == nil {
|
|
|
|
|
ns.Querytype, ns.Valid = "", false
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
ns.Valid = true
|
|
|
|
|
return ns.Querytype.Scan(value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Value implements the driver Valuer interface.
|
|
|
|
|
func (ns NullQuerytype) Value() (driver.Value, error) {
|
|
|
|
|
if !ns.Valid {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
return string(ns.Querytype), nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 12:19:49 +00:00
|
|
|
func (e Querytype) Valid() bool {
|
|
|
|
|
switch e {
|
|
|
|
|
case QuerytypeContextFull,
|
|
|
|
|
QuerytypeJsonExtractor:
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
type Client struct {
|
2025-01-29 16:26:11 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Name string `db:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Clientcansync struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Clientid pgtype.UUID `db:"clientid"`
|
|
|
|
|
Cansync bool `db:"cansync"`
|
|
|
|
|
Addedat pgtype.Timestamp `db:"addedat"`
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-19 18:49:22 +00:00
|
|
|
type Collector struct {
|
2025-01-23 14:56:20 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Jobid pgtype.UUID `db:"jobid"`
|
|
|
|
|
Latestversion int32 `db:"latestversion"`
|
|
|
|
|
Activeversion int32 `db:"activeversion"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Collectorcodeversion struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
2025-01-23 14:56:20 +00:00
|
|
|
Collectorid pgtype.UUID `db:"collectorid"`
|
2025-01-15 12:19:49 +00:00
|
|
|
Mincleanversion int32 `db:"mincleanversion"`
|
|
|
|
|
Mintextversion int32 `db:"mintextversion"`
|
2025-01-23 14:56:20 +00:00
|
|
|
Addedversion int32 `db:"addedversion"`
|
|
|
|
|
Removedversion *int32 `db:"removedversion"`
|
2024-12-19 18:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Collectorquery struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Collectorid pgtype.UUID `db:"collectorid"`
|
|
|
|
|
Name string `db:"name"`
|
|
|
|
|
Queryid pgtype.UUID `db:"queryid"`
|
|
|
|
|
Addedversion int32 `db:"addedversion"`
|
|
|
|
|
Removedversion *int32 `db:"removedversion"`
|
2024-12-19 18:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Collectorquerydependencytree struct {
|
2025-01-21 12:28:46 +00:00
|
|
|
Collectorid pgtype.UUID `db:"collectorid"`
|
2025-02-11 15:22:59 +00:00
|
|
|
Jobid pgtype.UUID `db:"jobid"`
|
2025-01-21 12:28:46 +00:00
|
|
|
Queryid pgtype.UUID `db:"queryid"`
|
|
|
|
|
Type Querytype `db:"type"`
|
|
|
|
|
Queryversion int32 `db:"queryversion"`
|
|
|
|
|
Requiredids []pgtype.UUID `db:"requiredids"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-23 14:56:20 +00:00
|
|
|
type Document struct {
|
2025-02-05 17:44:01 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Jobid pgtype.UUID `db:"jobid"`
|
|
|
|
|
Hash string `db:"hash"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-07 12:12:51 +00:00
|
|
|
type Documentclean struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Documentid pgtype.UUID `db:"documentid"`
|
|
|
|
|
Version int32 `db:"version"`
|
|
|
|
|
Bucket string `db:"bucket"`
|
|
|
|
|
Key string `db:"key"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-05 17:44:01 +00:00
|
|
|
type Documententry struct {
|
2025-02-07 12:12:51 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Documentid pgtype.UUID `db:"documentid"`
|
|
|
|
|
Bucket string `db:"bucket"`
|
|
|
|
|
Key string `db:"key"`
|
2025-01-23 14:56:20 +00:00
|
|
|
}
|
|
|
|
|
|
2025-02-07 14:15:06 +00:00
|
|
|
type Documenttextextraction struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Documentid pgtype.UUID `db:"documentid"`
|
|
|
|
|
Version int32 `db:"version"`
|
|
|
|
|
Bucket string `db:"bucket"`
|
|
|
|
|
Key string `db:"key"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
type Fullactivecollector struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
2025-01-21 12:28:46 +00:00
|
|
|
Jobid pgtype.UUID `db:"jobid"`
|
2025-01-29 11:52:37 +00:00
|
|
|
Mincleanversion int32 `db:"mincleanversion"`
|
|
|
|
|
Mintextversion int32 `db:"mintextversion"`
|
2025-01-21 12:28:46 +00:00
|
|
|
Activeversion int32 `db:"activeversion"`
|
|
|
|
|
Latestversion int32 `db:"latestversion"`
|
|
|
|
|
Fields []byte `db:"fields"`
|
2024-12-19 18:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-08 18:14:15 +00:00
|
|
|
type Fullactivequery struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Type Querytype `db:"type"`
|
|
|
|
|
Activeversion int32 `db:"activeversion"`
|
|
|
|
|
Latestversion int32 `db:"latestversion"`
|
|
|
|
|
Config []byte `db:"config"`
|
|
|
|
|
Requiredids []pgtype.UUID `db:"requiredids"`
|
2025-01-08 18:14:15 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-23 14:56:20 +00:00
|
|
|
type Job struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Clientid pgtype.UUID `db:"clientid"`
|
2025-01-29 16:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Jobcansync struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Jobid pgtype.UUID `db:"jobid"`
|
|
|
|
|
Cansync bool `db:"cansync"`
|
|
|
|
|
Addedat pgtype.Timestamp `db:"addedat"`
|
2025-01-23 14:56:20 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-19 18:49:22 +00:00
|
|
|
type Query struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Latestversion int32 `db:"latestversion"`
|
|
|
|
|
Activeversion int32 `db:"activeversion"`
|
|
|
|
|
Type Querytype `db:"type"`
|
2024-12-19 18:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-23 14:56:20 +00:00
|
|
|
type Queryactivedependency struct {
|
|
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Requiredqueryid pgtype.UUID `db:"requiredqueryid"`
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-23 12:26:05 +00:00
|
|
|
type Queryconfig struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Queryid pgtype.UUID `db:"queryid"`
|
|
|
|
|
Config []byte `db:"config"`
|
|
|
|
|
Addedversion int32 `db:"addedversion"`
|
|
|
|
|
Removedversion *int32 `db:"removedversion"`
|
2024-12-23 12:26:05 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-19 18:49:22 +00:00
|
|
|
type Requiredquery struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Queryid pgtype.UUID `db:"queryid"`
|
|
|
|
|
Requiredqueryid pgtype.UUID `db:"requiredqueryid"`
|
|
|
|
|
Addedversion int32 `db:"addedversion"`
|
|
|
|
|
Removedversion *int32 `db:"removedversion"`
|
2024-12-19 18:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Result struct {
|
2025-01-15 12:19:49 +00:00
|
|
|
ID pgtype.UUID `db:"id"`
|
|
|
|
|
Queryid pgtype.UUID `db:"queryid"`
|
|
|
|
|
Documentid pgtype.UUID `db:"documentid"`
|
|
|
|
|
Value string `db:"value"`
|
|
|
|
|
Cleanversion int32 `db:"cleanversion"`
|
|
|
|
|
Textversion int32 `db:"textversion"`
|
|
|
|
|
Queryversion int32 `db:"queryversion"`
|
2024-12-18 18:54:48 +00:00
|
|
|
}
|