Documentation ¶
Overview ¶
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) YugabyteDB, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func IsAllLowercase(s string) bool
- func IsAllUppercase(s string) bool
- func IsCaseSensitive(s string, sourceDbType string) bool
- func IsQuoted(s string) bool
- func IsReservedKeywordOracle(word string) bool
- func IsReservedKeywordPG(word string) bool
- type Identifier
- type NameTuple
- func (t NameTuple) AsQualifiedCatalogName() string
- func (t1 NameTuple) Equals(t2 NameTuple) bool
- func (t NameTuple) ForCatalogQuery() (string, string)
- func (t NameTuple) ForKey() string
- func (t NameTuple) ForMinOutput() string
- func (t NameTuple) ForOutput() string
- func (t NameTuple) ForUserQuery() string
- func (t NameTuple) Key() string
- func (t NameTuple) MatchesPattern(pattern string) (bool, error)
- func (t NameTuple) String() string
- type ObjectName
- type SourceName
- type TargetName
Constants ¶
const ( YUGABYTEDB = "yugabytedb" POSTGRESQL = "postgresql" ORACLE = "oracle" MYSQL = "mysql" )
Variables ¶
var ( SourceDBType string PreserveCase bool )
var OracleReservedKeywords = []string{}/* 253 elements not displayed */
var PgReservedKeywords = []string{"all", "analyse", "analyze", "and", "any", "array",
"as", "asc", "asymmetric", "both", "case", "cast", "check", "collate", "column",
"constraint", "create", "current_catalog", "current_date", "current_role",
"current_time", "current_timestamp", "current_user", "default", "deferrable",
"desc", "distinct", "do", "else", "end", "except", "false", "fetch", "for", "foreign",
"from", "grant", "group", "having", "in", "initially", "intersect", "into", "lateral",
"leading", "limit", "localtime", "localtimestamp", "not", "null", "offset", "on",
"only", "or", "order", "placing", "primary", "references", "returning", "select",
"session_user", "some", "symmetric", "table", "then", "to", "trailing", "true",
"union", "unique", "user", "using", "variadic", "when", "where", "window", "with"}
Functions ¶
func IsAllLowercase ¶ added in v1.3.0
func IsAllUppercase ¶ added in v1.3.0
func IsCaseSensitive ¶ added in v1.3.0
func IsReservedKeywordOracle ¶ added in v1.5.0
func IsReservedKeywordPG ¶ added in v1.5.0
Types ¶
type Identifier ¶
type NameTuple ¶ added in v1.7.0
type NameTuple struct { // Mode string CurrentName *ObjectName SourceName *ObjectName TargetName *ObjectName }
<SourceTableName, TargetTableName>
func SetDifferenceNameTuples ¶ added in v1.7.0
func (NameTuple) AsQualifiedCatalogName ¶ added in v1.7.0
func (NameTuple) ForCatalogQuery ¶ added in v1.7.0
func (NameTuple) ForMinOutput ¶ added in v1.7.0
func (NameTuple) ForUserQuery ¶ added in v1.7.0
func (NameTuple) MatchesPattern ¶ added in v1.7.0
type ObjectName ¶ added in v1.7.0
type ObjectName struct { SchemaName string FromDefaultSchema bool Qualified identifier Unqualified identifier MinQualified identifier }
Can be a name of a table, sequence, materialised view, etc.
func NewObjectName ¶ added in v1.7.0
func NewObjectName(dbType, defaultSchemaName, schemaName, tableName string) *ObjectName
func (*ObjectName) MatchesPattern ¶ added in v1.7.0
func (nv *ObjectName) MatchesPattern(pattern string) (bool, error)
func (*ObjectName) String ¶ added in v1.7.0
func (nv *ObjectName) String() string
type SourceName ¶
type SourceName struct { ObjectName Identifier SchemaName Identifier Qualified Identifier }
func NewSourceName ¶
func NewSourceName(schemaName, objectName string) *SourceName
func NewSourceNameFromMaybeQualifiedName ¶
func NewSourceNameFromMaybeQualifiedName(qualifiedName string, defaultSchemaName string) *SourceName
func NewSourceNameFromQualifiedName ¶
func NewSourceNameFromQualifiedName(qualifiedName string) *SourceName
func SetDifference ¶
func SetDifference(a, b []*SourceName) []*SourceName
func (*SourceName) String ¶
func (s *SourceName) String() string
func (*SourceName) ToTargetName ¶
func (s *SourceName) ToTargetName() *TargetName
type TargetName ¶
type TargetName struct { ObjectName Identifier SchemaName Identifier Qualified Identifier }
func NewTargetName ¶
func NewTargetName(schemaName, objectName string) *TargetName
func NewTargetNameFromMaybeQualifiedName ¶
func NewTargetNameFromMaybeQualifiedName(qualifiedName string, defaultSchemaName string) *TargetName
func NewTargetNameFromQualifiedName ¶
func NewTargetNameFromQualifiedName(qualifiedName string) *TargetName
func (*TargetName) String ¶
func (t *TargetName) String() string