-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Expand file tree
/
Copy pathfunction.proto
More file actions
83 lines (69 loc) · 1.88 KB
/
Copy pathfunction.proto
File metadata and controls
83 lines (69 loc) · 1.88 KB
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
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the CockroachDB Software License
// included in the /LICENSE file.
syntax = "proto2";
package cockroach.sql.catalog.catpb;
option go_package = "github.com/cockroachdb/cockroach/pkg/sql/catalog/catpb";
import "gogoproto/gogo.proto";
// Function contains a few enum types of function properties
message Function {
enum Volatility {
UNKNOWN_VOLATILITY = 0;
VOLATILE = 1;
IMMUTABLE = 2;
STABLE = 3;
}
enum NullInputBehavior {
UNKNOWN_NULL_INPUT_BEHAVIOR = 0;
CALLED_ON_NULL_INPUT = 1;
RETURNS_NULL_ON_NULL_INPUT = 2;
STRICT = 3;
}
enum Language {
UNKNOWN_LANGUAGE = 0;
SQL = 1;
PLPGSQL = 2;
}
message Param {
enum Class {
DEFAULT = 0;
IN = 1;
OUT = 2;
IN_OUT = 3;
VARIADIC = 4;
}
}
enum Security {
INVOKER = 0;
DEFINER = 1;
}
enum CanMutate {
UNKNOWN_CAN_MUTATE = 0;
CAN_MUTATE = 1;
CANNOT_MUTATE = 2;
}
}
// These wrappers are for the convenience of referencing the enum types from a
// proto3 definition.
message FunctionVolatility {
option (gogoproto.equal) = true;
optional Function.Volatility volatility = 1 [(gogoproto.nullable) = false];
}
message FunctionNullInputBehavior {
option (gogoproto.equal) = true;
optional Function.NullInputBehavior nullInputBehavior = 1 [(gogoproto.nullable) = false];
}
message FunctionLanguage {
option (gogoproto.equal) = true;
optional Function.Language lang = 1 [(gogoproto.nullable) = false];
}
message FunctionParamClass {
option (gogoproto.equal) = true;
optional Function.Param.Class class = 1 [(gogoproto.nullable) = false];
}
message FunctionSecurity {
option (gogoproto.equal) = true;
// If security is not explicitly set, the default security mode is INVOKER.
optional Function.Security security = 1 [(gogoproto.nullable) = false];
}