/
boil_types.go
103 lines (86 loc) · 2.32 KB
/
boil_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Code generated by SQLBoiler 4.13.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models
import (
"strconv"
"github.com/friendsofgo/errors"
"github.com/volatiletech/sqlboiler/v4/boil"
"github.com/volatiletech/strmangle"
)
// M type is for providing columns and column values to UpdateAll.
type M map[string]interface{}
// ErrSyncFail occurs during insert when the record could not be retrieved in
// order to populate default value information. This usually happens when LastInsertId
// fails or there was a primary key configuration that was not resolvable.
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
type insertCache struct {
query string
retQuery string
valueMapping []uint64
retMapping []uint64
}
type updateCache struct {
query string
valueMapping []uint64
}
func makeCacheKey(cols boil.Columns, nzDefaults []string) string {
buf := strmangle.GetBuffer()
buf.WriteString(strconv.Itoa(cols.Kind))
for _, w := range cols.Cols {
buf.WriteString(w)
}
if len(nzDefaults) != 0 {
buf.WriteByte('.')
}
for _, nz := range nzDefaults {
buf.WriteString(nz)
}
str := buf.String()
strmangle.PutBuffer(buf)
return str
}
// Enum values for Powertrain
const (
PowertrainALL string = "ALL"
PowertrainHybridsAndICE string = "HybridsAndICE"
PowertrainICE string = "ICE"
PowertrainHEV string = "HEV"
PowertrainPHEV string = "PHEV"
PowertrainBEV string = "BEV"
PowertrainFCEV string = "FCEV"
)
func AllPowertrain() []string {
return []string{
PowertrainALL,
PowertrainHybridsAndICE,
PowertrainICE,
PowertrainHEV,
PowertrainPHEV,
PowertrainBEV,
PowertrainFCEV,
}
}
// Enum values for IntegrationType
const (
IntegrationTypeHardware string = "Hardware"
IntegrationTypeAPI string = "API"
)
func AllIntegrationType() []string {
return []string{
IntegrationTypeHardware,
IntegrationTypeAPI,
}
}
// Enum values for IntegrationStyle
const (
IntegrationStyleAddon string = "Addon"
IntegrationStyleOEM string = "OEM"
IntegrationStyleWebhook string = "Webhook"
)
func AllIntegrationStyle() []string {
return []string{
IntegrationStyleAddon,
IntegrationStyleOEM,
IntegrationStyleWebhook,
}
}