github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sem/semenumpb/constraint.proto (about) 1 // Copyright 2022 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 // This file should contain only EMUN definitions for concepts that 12 // are visible in the SQL layer (i.e. concepts that can be configured 13 // in a SQL query). 14 // It uses proto3 so other packages can import those enum definitions 15 // when needed. 16 syntax = "proto3"; 17 package cockroach.sql.sem.semenumpb; 18 option go_package = "github.com/cockroachdb/cockroach/pkg/sql/sem/semenumpb"; 19 20 import "gogoproto/gogo.proto"; 21 22 // ForeignKeyAction describes the action which should be taken when a foreign 23 // key constraint reference is acted upon. 24 enum ForeignKeyAction { 25 NO_ACTION = 0; 26 RESTRICT = 1; 27 SET_NULL = 2; 28 SET_DEFAULT = 3; 29 CASCADE = 4; 30 } 31 32 // Match is the algorithm used to compare composite keys. 33 enum Match { 34 SIMPLE = 0; 35 FULL = 1; 36 PARTIAL = 2; // Note: not actually supported, but we reserve the value for future use. 37 }