aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ClickHouse/ch-go/proto/col_ipv4_gen.go
blob: 4c7a0bc906ecd5d6840eba0dca1b7cafd00ac734 (plain) (blame)
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
// Code generated by ./cmd/ch-gen-col, DO NOT EDIT.

package proto

// ColIPv4 represents IPv4 column.
type ColIPv4 []IPv4

// Compile-time assertions for ColIPv4.
var (
	_ ColInput  = ColIPv4{}
	_ ColResult = (*ColIPv4)(nil)
	_ Column    = (*ColIPv4)(nil)
)

// Rows returns count of rows in column.
func (c ColIPv4) Rows() int {
	return len(c)
}

// Reset resets data in row, preserving capacity for efficiency.
func (c *ColIPv4) Reset() {
	*c = (*c)[:0]
}

// Type returns ColumnType of IPv4.
func (ColIPv4) Type() ColumnType {
	return ColumnTypeIPv4
}

// Row returns i-th row of column.
func (c ColIPv4) Row(i int) IPv4 {
	return c[i]
}

// Append IPv4 to column.
func (c *ColIPv4) Append(v IPv4) {
	*c = append(*c, v)
}

// Append IPv4 slice to column.
func (c *ColIPv4) AppendArr(vs []IPv4) {
	*c = append(*c, vs...)
}

// LowCardinality returns LowCardinality for IPv4 .
func (c *ColIPv4) LowCardinality() *ColLowCardinality[IPv4] {
	return &ColLowCardinality[IPv4]{
		index: c,
	}
}

// Array is helper that creates Array of IPv4.
func (c *ColIPv4) Array() *ColArr[IPv4] {
	return &ColArr[IPv4]{
		Data: c,
	}
}

// Nullable is helper that creates Nullable(IPv4).
func (c *ColIPv4) Nullable() *ColNullable[IPv4] {
	return &ColNullable[IPv4]{
		Values: c,
	}
}

// NewArrIPv4 returns new Array(IPv4).
func NewArrIPv4() *ColArr[IPv4] {
	return &ColArr[IPv4]{
		Data: new(ColIPv4),
	}
}