Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateGoStructFromBigQueryTableSchema(schema *BigQueryTableSchema, options GoStructOptions) (string, error)
- func GenerateGoStructFromSpannerStructType(rowType *spannerpb.StructType, options GoStructOptions) (string, error)
- func GenerateQueryCode(config QueryCodegenConfig, baseDir string) (string, error)
- type Analyzer
- type BigQueryAnalyzer
- type BigQuerySpannerExternalDatasetBinding
- type BigQuerySpannerExternalDatasetColumn
- type BigQuerySpannerExternalDatasetOptions
- type BigQuerySpannerExternalDatasetTable
- type BigQuerySpannerExternalDatasetVerification
- type BigQueryTableFieldSchema
- type BigQueryTableSchema
- type Catalog
- type Column
- type GoStructOptions
- type GoStructTarget
- type Index
- type QueryCodegenConfig
- type QueryCodegenDiagnosticError
- type QueryCodegenExternalSchema
- type QueryCodegenFederatedQuery
- type QueryCodegenParam
- type QueryCodegenPlan
- type QueryCodegenPlanColumnCapability
- type QueryCodegenPlanConstant
- type QueryCodegenPlanDigest
- type QueryCodegenPlanField
- type QueryCodegenPlanGenerator
- type QueryCodegenPlanProjection
- type QueryCodegenPlanQuery
- type QueryCodegenPlanQueryVariant
- type QueryCodegenPlanRelation
- type QueryCodegenPlanServerSideEffect
- type QueryCodegenPlanStarExpansion
- type QueryCodegenPlanStruct
- type QueryCodegenPlanVetSuppression
- type QueryCodegenPlanWarning
- type QueryCodegenPlanWrite
- type QueryCodegenQuery
- type QueryCodegenSchema
- type QueryCodegenSpannerExternalDataset
- type QueryCodegenSpannerExternalDatasetAccess
- type QueryCodegenSpannerExternalDatasetVerification
- type QueryCodegenV1AlphaBigQueryEmit
- type QueryCodegenV1AlphaCatalog
- type QueryCodegenV1AlphaCatalogBinding
- type QueryCodegenV1AlphaColumnList
- type QueryCodegenV1AlphaConfig
- type QueryCodegenV1AlphaEmit
- type QueryCodegenV1AlphaExternalDatasetAccess
- type QueryCodegenV1AlphaExternalQueryConnection
- type QueryCodegenV1AlphaGo
- type QueryCodegenV1AlphaInputStruct
- type QueryCodegenV1AlphaProjectionPolicy
- type QueryCodegenV1AlphaQuery
- type QueryCodegenV1AlphaQueryResult
- type QueryCodegenV1AlphaRequiredFields
- type QueryCodegenV1AlphaRuleSuppression
- type QueryCodegenV1AlphaRules
- type QueryCodegenV1AlphaSpannerEmit
- type QueryCodegenV1AlphaSpannerExternalDataset
- type QueryCodegenV1AlphaWrite
- type QueryCodegenV1AlphaWriteConflict
- type QueryCodegenV1AlphaWriteInsert
- type QueryCodegenV1AlphaWriteUpdate
- type QueryCodegenVetConfig
- type QueryCodegenVetDisable
- type QueryCodegenWrite
- type QueryCodegenWriteConflict
- type QueryCodegenWriteInsert
- type QueryCodegenWriteUpdate
- type Table
- type TypeSpec
Constants ¶
View Source
const QueryCodegenConfigVersionV1Alpha = "v1alpha"
Variables ¶
View Source
var ( BuildBigQueryGoogleSQLCatalogFromDDL = spanalyzer.BuildBigQueryGoogleSQLCatalogFromDDL BuildSchemaCatalog = spanalyzer.BuildSchemaCatalog NewAnalyzerFromDDLWithProtoDescriptorFiles = spanalyzer.NewAnalyzerFromDDLWithProtoDescriptorFiles NewBigQueryAnalyzerFromDDL = spanalyzer.NewBigQueryAnalyzerFromDDL ParseTypeSpec = spanalyzer.ParseTypeSpec )
Functions ¶
func GenerateGoStructFromBigQueryTableSchema ¶
func GenerateGoStructFromBigQueryTableSchema(schema *BigQueryTableSchema, options GoStructOptions) (string, error)
func GenerateGoStructFromSpannerStructType ¶
func GenerateGoStructFromSpannerStructType(rowType *spannerpb.StructType, options GoStructOptions) (string, error)
func GenerateQueryCode ¶
func GenerateQueryCode(config QueryCodegenConfig, baseDir string) (string, error)
Types ¶
type Analyzer ¶
type Analyzer = spanalyzer.Analyzer
type BigQueryAnalyzer ¶
type BigQueryAnalyzer = spanalyzer.BigQueryAnalyzer
type BigQuerySpannerExternalDatasetBinding ¶
type BigQuerySpannerExternalDatasetBinding = spanalyzer.BigQuerySpannerExternalDatasetBinding
type BigQuerySpannerExternalDatasetColumn ¶
type BigQuerySpannerExternalDatasetColumn = spanalyzer.BigQuerySpannerExternalDatasetColumn
type BigQuerySpannerExternalDatasetOptions ¶
type BigQuerySpannerExternalDatasetOptions = spanalyzer.BigQuerySpannerExternalDatasetOptions
type BigQuerySpannerExternalDatasetTable ¶
type BigQuerySpannerExternalDatasetTable = spanalyzer.BigQuerySpannerExternalDatasetTable
type BigQuerySpannerExternalDatasetVerification ¶
type BigQuerySpannerExternalDatasetVerification = spanalyzer.BigQuerySpannerExternalDatasetVerification
type BigQueryTableFieldSchema ¶
type BigQueryTableFieldSchema = spanalyzer.BigQueryTableFieldSchema
type BigQueryTableSchema ¶
type BigQueryTableSchema = spanalyzer.BigQueryTableSchema
type Catalog ¶
type Catalog = spanalyzer.Catalog
type Column ¶
type Column = spanalyzer.Column
type GoStructOptions ¶
type GoStructOptions struct {
PackageName string
StructName string
Target GoStructTarget
}
type GoStructTarget ¶
type GoStructTarget string
const ( GoStructTargetBigQuery GoStructTarget = "bigquery" GoStructTargetSpanner GoStructTarget = "spanner" GoStructTargetBoth GoStructTarget = "both" )
type Index ¶
type Index = spanalyzer.Index
type QueryCodegenConfig ¶
type QueryCodegenConfig struct {
Version string `json:"version" yaml:"version"`
Package string `json:"package" yaml:"package"`
Out string `json:"out" yaml:"out"`
Client GoStructTarget `json:"client" yaml:"client"`
Schemas []QueryCodegenSchema `json:"schemas" yaml:"schemas"`
Queries []QueryCodegenQuery `json:"queries" yaml:"queries"`
Writes []QueryCodegenWrite `json:"writes" yaml:"writes"`
RuleSeverity map[string]string `json:"rule_severity,omitempty" yaml:"rule_severity,omitempty"`
}
func ParseQueryCodegenConfigYAML ¶
func ParseQueryCodegenConfigYAML(data []byte) (QueryCodegenConfig, error)
ParseQueryCodegenConfigYAML parses the public spanner-query-gen YAML config. The command only accepts the v1alpha config shape. Tests and package-level helpers may still construct QueryCodegenConfig directly, but YAML input is the user-facing contract and must use version v1alpha.
type QueryCodegenDiagnosticError ¶
type QueryCodegenDiagnosticError = spanalyzer.QueryCodegenDiagnosticError
type QueryCodegenParam ¶
type QueryCodegenParam struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Scope string `json:"scope,omitempty" yaml:"scope,omitempty"`
// Optional selects how this parameter shapes the generated SQL. The
// empty string is equivalent to "required" (current behavior). See
// internal/optparam for the full data model.
//
// Supported values: "required", "null_is_null", "omit_when_null",
// "omit_when_empty", "orderby_choice".
Optional string `json:"optional,omitempty" yaml:"optional,omitempty"`
// Choices is the allowlist of ORDER BY clauses for an
// orderby_choice param, keyed by the runtime choice key.
Choices map[string]string `json:"choices,omitempty" yaml:"choices,omitempty"`
// Default is the choice key used when the runtime caller does not
// specify one. Required for orderby_choice; must match a key in
// Choices.
Default string `json:"default,omitempty" yaml:"default,omitempty"`
}
type QueryCodegenPlan ¶
type QueryCodegenPlan struct {
PlanVersion int `json:"plan_version" yaml:"plan_version"`
Generator QueryCodegenPlanGenerator `json:"generator" yaml:"generator"`
Package string `json:"package,omitempty" yaml:"package,omitempty"`
Out string `json:"out,omitempty" yaml:"out,omitempty"`
Client GoStructTarget `json:"client,omitempty" yaml:"client,omitempty"`
SchemaDigests []QueryCodegenPlanDigest `json:"schema_digests,omitempty" yaml:"schema_digests,omitempty"`
CatalogBindings []BigQuerySpannerExternalDatasetBinding `json:"catalog_bindings,omitempty" yaml:"catalog_bindings,omitempty"`
Queries []QueryCodegenPlanQuery `json:"queries,omitempty" yaml:"queries,omitempty"`
Writes []QueryCodegenPlanWrite `json:"writes,omitempty" yaml:"writes,omitempty"`
Structs []QueryCodegenPlanStruct `json:"structs,omitempty" yaml:"structs,omitempty"`
}
func BuildQueryCodegenPlan ¶
func BuildQueryCodegenPlan(config QueryCodegenConfig, baseDir string) (*QueryCodegenPlan, error)
type QueryCodegenPlanColumnCapability ¶
type QueryCodegenPlanColumnCapability struct {
Name string `json:"name" yaml:"name"`
Nullable bool `json:"nullable" yaml:"nullable"`
PrimaryKey bool `json:"primary_key,omitempty" yaml:"primary_key,omitempty"`
Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`
InsertValue bool `json:"insert_value" yaml:"insert_value"`
UpdateValue bool `json:"update_value" yaml:"update_value"`
DefaultSQL string `json:"default_sql,omitempty" yaml:"default_sql,omitempty"`
GeneratedSQL string `json:"generated_sql,omitempty" yaml:"generated_sql,omitempty"`
OnUpdateSQL string `json:"on_update_sql,omitempty" yaml:"on_update_sql,omitempty"`
AllowCommitTimestamp bool `json:"allow_commit_timestamp,omitempty" yaml:"allow_commit_timestamp,omitempty"`
}
type QueryCodegenPlanDigest ¶
type QueryCodegenPlanField ¶
type QueryCodegenPlanField struct {
Name string `json:"name" yaml:"name"`
Kind string `json:"kind" yaml:"kind"`
Repeated bool `json:"repeated,omitempty" yaml:"repeated,omitempty"`
Nullable bool `json:"nullable" yaml:"nullable"`
Fields []QueryCodegenPlanField `json:"fields,omitempty" yaml:"fields,omitempty"`
}
type QueryCodegenPlanProjection ¶
type QueryCodegenPlanProjection struct {
RelationHasOmittedColumns bool `json:"relation_has_omitted_columns" yaml:"relation_has_omitted_columns"`
SelectedOutputAffected bool `json:"selected_output_affected" yaml:"selected_output_affected"`
OmittedColumns []string `json:"omitted_columns,omitempty" yaml:"omitted_columns,omitempty"`
}
type QueryCodegenPlanQuery ¶
type QueryCodegenPlanQuery struct {
Name string `json:"name" yaml:"name"`
Catalog string `json:"catalog" yaml:"catalog"`
Kind string `json:"kind" yaml:"kind"`
Result string `json:"result" yaml:"result"`
OrderBy string `json:"order_by,omitempty" yaml:"order_by,omitempty"`
SQL string `json:"sql" yaml:"sql"`
SQLSHA256 string `json:"sql_sha256" yaml:"sql_sha256"`
ResultStruct string `json:"result_struct" yaml:"result_struct"`
Constants []QueryCodegenPlanConstant `json:"constants,omitempty" yaml:"constants,omitempty"`
Params []QueryCodegenParam `json:"params,omitempty" yaml:"params,omitempty"`
StarExpansion *QueryCodegenPlanStarExpansion `json:"star_expansion,omitempty" yaml:"star_expansion,omitempty"`
Relations []QueryCodegenPlanRelation `json:"relations,omitempty" yaml:"relations,omitempty"`
VetSuppressions []QueryCodegenPlanVetSuppression `json:"vet_suppressions,omitempty" yaml:"vet_suppressions,omitempty"`
Warnings []QueryCodegenPlanWarning `json:"warnings,omitempty" yaml:"warnings,omitempty"`
Fields []QueryCodegenPlanField `json:"fields,omitempty" yaml:"fields,omitempty"`
// Variants is the per-shape plan-contract entry produced by
// optparam.BuildPlanVariants. It is populated only for queries
// that use one or more optional markers. The top-level SQL /
// SQLSHA256 fields stay populated with the all-on variant so
// existing consumers continue to work.
Variants []QueryCodegenPlanQueryVariant `json:"variants,omitempty" yaml:"variants,omitempty"`
}
type QueryCodegenPlanQueryVariant ¶
type QueryCodegenPlanQueryVariant struct {
Label string `json:"label" yaml:"label"`
SQL string `json:"sql" yaml:"sql"`
SQLSHA256 string `json:"sql_sha256" yaml:"sql_sha256"`
PresentParams []string `json:"present_params,omitempty" yaml:"present_params,omitempty"`
AbsentParams []string `json:"absent_params,omitempty" yaml:"absent_params,omitempty"`
ChoiceAssignments map[string]string `json:"choice_assignments,omitempty" yaml:"choice_assignments,omitempty"`
}
QueryCodegenPlanQueryVariant is one row of the per-variant plan contract for a query with optional markers. The shape mirrors internal/optparam.PlanQueryVariant.
type QueryCodegenPlanRelation ¶
type QueryCodegenPlanRelation struct {
SQLPath string `json:"sql_path" yaml:"sql_path"`
Catalog string `json:"catalog" yaml:"catalog"`
Role string `json:"role" yaml:"role"`
Allowed bool `json:"allowed" yaml:"allowed"`
WritableTarget bool `json:"writable_target" yaml:"writable_target"`
Diagnostic string `json:"diagnostic,omitempty" yaml:"diagnostic,omitempty"`
ProjectionLoss bool `json:"projection_loss" yaml:"projection_loss"`
OmittedColumns []string `json:"omitted_columns,omitempty" yaml:"omitted_columns,omitempty"`
Projection QueryCodegenPlanProjection `json:"projection" yaml:"projection"`
}
type QueryCodegenPlanStarExpansion ¶
type QueryCodegenPlanStarExpansion struct {
Catalog string `json:"catalog" yaml:"catalog"`
ProjectionLoss bool `json:"projection_loss" yaml:"projection_loss"`
OmittedColumns []string `json:"omitted_columns,omitempty" yaml:"omitted_columns,omitempty"`
Projection QueryCodegenPlanProjection `json:"projection" yaml:"projection"`
}
type QueryCodegenPlanStruct ¶
type QueryCodegenPlanStruct struct {
Name string `json:"name" yaml:"name"`
Fields []QueryCodegenPlanField `json:"fields,omitempty" yaml:"fields,omitempty"`
}
type QueryCodegenPlanVetSuppression ¶
type QueryCodegenPlanVetSuppression = spanalyzer.QueryCodegenPlanVetSuppression
type QueryCodegenPlanWarning ¶
type QueryCodegenPlanWarning = spanalyzer.QueryCodegenPlanWarning
type QueryCodegenPlanWrite ¶
type QueryCodegenPlanWrite struct {
Name string `json:"name" yaml:"name"`
Catalog string `json:"catalog" yaml:"catalog"`
Table string `json:"table" yaml:"table"`
Operation string `json:"operation" yaml:"operation"`
InputStruct string `json:"input_struct" yaml:"input_struct"`
Keys []string `json:"keys,omitempty" yaml:"keys,omitempty"`
InsertColumns []string `json:"insert_columns,omitempty" yaml:"insert_columns,omitempty"`
UpdateColumns []string `json:"update_columns,omitempty" yaml:"update_columns,omitempty"`
Methods []string `json:"methods,omitempty" yaml:"methods,omitempty"`
ColumnCapabilities []QueryCodegenPlanColumnCapability `json:"column_capabilities,omitempty" yaml:"column_capabilities,omitempty"`
ServerSideUpdateEffects []QueryCodegenPlanServerSideEffect `json:"server_side_update_effects,omitempty" yaml:"server_side_update_effects,omitempty"`
VetSuppressions []QueryCodegenPlanVetSuppression `json:"vet_suppressions,omitempty" yaml:"vet_suppressions,omitempty"`
}
type QueryCodegenQuery ¶
type QueryCodegenQuery struct {
Name string `json:"name" yaml:"name"`
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
Catalog string `json:"catalog" yaml:"catalog"`
SQL string `json:"sql,omitempty" yaml:"sql,omitempty"`
Table string `json:"table,omitempty" yaml:"table,omitempty"`
Index string `json:"index,omitempty" yaml:"index,omitempty"`
Federated QueryCodegenFederatedQuery `json:"federated" yaml:"federated"`
KeyPrefix []string `json:"key_prefix" yaml:"key_prefix"`
OrderBy string `json:"order_by,omitempty" yaml:"order_by,omitempty"`
Result string `json:"result" yaml:"result"`
ResultStruct string `json:"result_struct" yaml:"result_struct"`
Required []string `json:"required" yaml:"required"`
RequiredPolicy string `json:"required_policy" yaml:"required_policy"`
Params []QueryCodegenParam `json:"params" yaml:"params"`
Vet QueryCodegenVetConfig `json:"vet" yaml:"vet"`
}
type QueryCodegenSchema ¶
type QueryCodegenSchema struct {
Name string `json:"name" yaml:"name"`
Dialect string `json:"dialect" yaml:"dialect"`
Project string `json:"project,omitempty" yaml:"project,omitempty"`
DDL string `json:"ddl" yaml:"ddl"`
ProtoDescriptorFiles []string `json:"proto_descriptors" yaml:"proto_descriptors"`
ExternalSchemas []QueryCodegenExternalSchema `json:"external_schemas" yaml:"external_schemas"`
ExternalQueryConnections []QueryCodegenExternalSchema `json:"external_query_connections" yaml:"external_query_connections"`
SpannerExternalDatasets []QueryCodegenSpannerExternalDataset `json:"spanner_external_datasets" yaml:"spanner_external_datasets"`
}
type QueryCodegenSpannerExternalDataset ¶
type QueryCodegenSpannerExternalDataset struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Dataset string `json:"dataset" yaml:"dataset"`
Project string `json:"project,omitempty" yaml:"project,omitempty"`
SpannerSource string `json:"spanner_source" yaml:"spanner_source"`
ExternalSource string `json:"external_source,omitempty" yaml:"external_source,omitempty"`
Location string `json:"location,omitempty" yaml:"location,omitempty"`
Connection string `json:"connection,omitempty" yaml:"connection,omitempty"`
CloudResourceConnection string `json:"cloud_resource_connection,omitempty" yaml:"cloud_resource_connection,omitempty"`
Access QueryCodegenSpannerExternalDatasetAccess `json:"access,omitempty" yaml:"access,omitempty"`
DatabaseRole string `json:"database_role,omitempty" yaml:"database_role,omitempty"`
AccessVerification QueryCodegenSpannerExternalDatasetVerification `json:"access_verification,omitempty" yaml:"access_verification,omitempty"`
UnsupportedColumns string `json:"unsupported_columns,omitempty" yaml:"unsupported_columns,omitempty"`
NamedSchemaPolicy string `json:"named_schema_policy,omitempty" yaml:"named_schema_policy,omitempty"`
Vet QueryCodegenVetConfig `json:"vet" yaml:"vet"`
}
type QueryCodegenSpannerExternalDatasetAccess ¶
type QueryCodegenSpannerExternalDatasetAccess struct {
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
CloudResourceConnection string `json:"cloud_resource_connection,omitempty" yaml:"cloud_resource_connection,omitempty"`
DatabaseRole string `json:"database_role,omitempty" yaml:"database_role,omitempty"`
VerificationHint string `json:"verification_hint,omitempty" yaml:"verification_hint,omitempty"`
VerificationEvidence QueryCodegenSpannerExternalDatasetVerification `json:"verification_evidence,omitempty" yaml:"verification_evidence,omitempty"`
}
func (*QueryCodegenSpannerExternalDatasetAccess) UnmarshalYAML ¶
func (a *QueryCodegenSpannerExternalDatasetAccess) UnmarshalYAML(unmarshal func(interface{}) error) error
type QueryCodegenSpannerExternalDatasetVerification ¶
type QueryCodegenSpannerExternalDatasetVerification struct {
Status string `json:"status,omitempty" yaml:"status,omitempty"`
Source string `json:"source,omitempty" yaml:"source,omitempty"`
CheckedAt string `json:"checked_at,omitempty" yaml:"checked_at,omitempty"`
Verifier string `json:"verifier,omitempty" yaml:"verifier,omitempty"`
EvidenceDigest string `json:"evidence_digest,omitempty" yaml:"evidence_digest,omitempty"`
}
type QueryCodegenV1AlphaCatalog ¶
type QueryCodegenV1AlphaCatalog struct {
Name string `json:"name" yaml:"name"`
Kind string `json:"kind" yaml:"kind"`
Dialect string `json:"dialect,omitempty" yaml:"dialect,omitempty"`
Project string `json:"project,omitempty" yaml:"project,omitempty"`
DDL string `json:"ddl,omitempty" yaml:"ddl,omitempty"`
ProtoDescriptorFiles []string `json:"proto_descriptors,omitempty" yaml:"proto_descriptors,omitempty"`
Bindings QueryCodegenV1AlphaCatalogBinding `json:"bindings" yaml:"bindings"`
}
type QueryCodegenV1AlphaCatalogBinding ¶
type QueryCodegenV1AlphaCatalogBinding struct {
ExternalQueryConnections []QueryCodegenV1AlphaExternalQueryConnection `json:"external_query_connections" yaml:"external_query_connections"`
SpannerExternalDatasets []QueryCodegenV1AlphaSpannerExternalDataset `json:"spanner_external_datasets" yaml:"spanner_external_datasets"`
}
type QueryCodegenV1AlphaColumnList ¶
type QueryCodegenV1AlphaColumnList struct {
Columns []string
}
func (*QueryCodegenV1AlphaColumnList) UnmarshalYAML ¶
func (l *QueryCodegenV1AlphaColumnList) UnmarshalYAML(unmarshal func(interface{}) error) error
type QueryCodegenV1AlphaConfig ¶
type QueryCodegenV1AlphaConfig struct {
Version string `json:"version" yaml:"version"`
Go QueryCodegenV1AlphaGo `json:"go" yaml:"go"`
Emit QueryCodegenV1AlphaEmit `json:"emit" yaml:"emit"`
Catalogs []QueryCodegenV1AlphaCatalog `json:"catalogs" yaml:"catalogs"`
Queries []QueryCodegenV1AlphaQuery `json:"queries" yaml:"queries"`
Writes []QueryCodegenV1AlphaWrite `json:"writes" yaml:"writes"`
Rules QueryCodegenV1AlphaRules `json:"rules" yaml:"rules"`
}
func (QueryCodegenV1AlphaConfig) Normalize ¶
func (c QueryCodegenV1AlphaConfig) Normalize() (QueryCodegenConfig, error)
type QueryCodegenV1AlphaEmit ¶
type QueryCodegenV1AlphaEmit struct {
Spanner QueryCodegenV1AlphaSpannerEmit `json:"spanner" yaml:"spanner"`
BigQuery QueryCodegenV1AlphaBigQueryEmit `json:"bigquery" yaml:"bigquery"`
}
type QueryCodegenV1AlphaExternalDatasetAccess ¶
type QueryCodegenV1AlphaExternalDatasetAccess struct {
CloudResourceConnectionID string `json:"cloud_resource_connection_id,omitempty" yaml:"cloud_resource_connection_id,omitempty"`
VerificationEvidence QueryCodegenSpannerExternalDatasetVerification `json:"verification_evidence,omitempty" yaml:"verification_evidence,omitempty"`
}
type QueryCodegenV1AlphaGo ¶
type QueryCodegenV1AlphaInputStruct ¶
type QueryCodegenV1AlphaInputStruct struct {
Struct string
}
func (*QueryCodegenV1AlphaInputStruct) UnmarshalYAML ¶
func (i *QueryCodegenV1AlphaInputStruct) UnmarshalYAML(unmarshal func(interface{}) error) error
type QueryCodegenV1AlphaQuery ¶
type QueryCodegenV1AlphaQuery struct {
Name string `json:"name" yaml:"name"`
Catalog string `json:"catalog" yaml:"catalog"`
Kind string `json:"kind" yaml:"kind"`
SQL string `json:"sql,omitempty" yaml:"sql,omitempty"`
Table string `json:"table,omitempty" yaml:"table,omitempty"`
Index string `json:"index,omitempty" yaml:"index,omitempty"`
Binding string `json:"binding,omitempty" yaml:"binding,omitempty"`
InnerSQL string `json:"inner_sql,omitempty" yaml:"inner_sql,omitempty"`
OuterSQL string `json:"outer_sql,omitempty" yaml:"outer_sql,omitempty"`
KeyPrefix []string `json:"key_prefix,omitempty" yaml:"key_prefix,omitempty"`
OrderBy string `json:"order_by,omitempty" yaml:"order_by,omitempty"`
Result QueryCodegenV1AlphaQueryResult `json:"result" yaml:"result"`
Params []QueryCodegenParam `json:"params,omitempty" yaml:"params,omitempty"`
}
type QueryCodegenV1AlphaQueryResult ¶
type QueryCodegenV1AlphaQueryResult struct {
Cardinality string `json:"cardinality,omitempty" yaml:"cardinality,omitempty"`
Struct string `json:"struct,omitempty" yaml:"struct,omitempty"`
Required QueryCodegenV1AlphaRequiredFields `json:"required,omitempty" yaml:"required,omitempty"`
}
type QueryCodegenV1AlphaRuleSuppression ¶
type QueryCodegenV1AlphaRuleSuppression struct {
Scope string `json:"scope" yaml:"scope"`
Rule string `json:"rule" yaml:"rule"`
Reason string `json:"reason" yaml:"reason"`
Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
Expires string `json:"expires,omitempty" yaml:"expires,omitempty"`
}
type QueryCodegenV1AlphaRules ¶
type QueryCodegenV1AlphaRules struct {
Suppressions []QueryCodegenV1AlphaRuleSuppression `json:"suppressions,omitempty" yaml:"suppressions,omitempty"`
}
type QueryCodegenV1AlphaSpannerExternalDataset ¶
type QueryCodegenV1AlphaSpannerExternalDataset struct {
Name string `json:"name" yaml:"name"`
Dataset string `json:"dataset" yaml:"dataset"`
SpannerCatalog string `json:"spanner_catalog" yaml:"spanner_catalog"`
SpannerDatabaseURI string `json:"spanner_database_uri,omitempty" yaml:"spanner_database_uri,omitempty"`
Location string `json:"location,omitempty" yaml:"location,omitempty"`
Access QueryCodegenV1AlphaExternalDatasetAccess `json:"access" yaml:"access"`
Projection QueryCodegenV1AlphaProjectionPolicy `json:"projection" yaml:"projection"`
}
type QueryCodegenV1AlphaWrite ¶
type QueryCodegenV1AlphaWrite struct {
Name string `json:"name" yaml:"name"`
Catalog string `json:"catalog" yaml:"catalog"`
Table string `json:"table" yaml:"table"`
Operation string `json:"operation" yaml:"operation"`
Input QueryCodegenV1AlphaInputStruct `json:"input" yaml:"input"`
Key QueryCodegenV1AlphaColumnList `json:"key" yaml:"key"`
Insert QueryCodegenV1AlphaWriteInsert `json:"insert" yaml:"insert"`
Update QueryCodegenV1AlphaWriteUpdate `json:"update" yaml:"update"`
Conflict QueryCodegenV1AlphaWriteConflict `json:"conflict" yaml:"conflict"`
}
type QueryCodegenV1AlphaWriteConflict ¶
type QueryCodegenV1AlphaWriteConflict struct {
Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"`
}
type QueryCodegenV1AlphaWriteInsert ¶
type QueryCodegenV1AlphaWriteInsert struct {
Columns []string `json:"columns,omitempty" yaml:"columns,omitempty"`
}
type QueryCodegenVetConfig ¶
type QueryCodegenVetConfig struct {
Disable []QueryCodegenVetDisable `json:"disable" yaml:"disable"`
}
type QueryCodegenVetDisable ¶
type QueryCodegenWrite ¶
type QueryCodegenWrite struct {
Name string `json:"name" yaml:"name"`
Catalog string `json:"catalog" yaml:"catalog"`
Table string `json:"table" yaml:"table"`
Operation string `json:"operation" yaml:"operation"`
InputStruct string `json:"input_struct" yaml:"input_struct"`
Keys []string `json:"keys" yaml:"keys"`
Insert QueryCodegenWriteInsert `json:"insert,omitempty" yaml:"insert,omitempty"`
Update QueryCodegenWriteUpdate `json:"update,omitempty" yaml:"update,omitempty"`
Conflict QueryCodegenWriteConflict `json:"conflict,omitempty" yaml:"conflict,omitempty"`
Methods []string `json:"methods" yaml:"methods"`
EmitExplicit bool `json:"-" yaml:"-"`
Vet QueryCodegenVetConfig `json:"vet" yaml:"vet"`
}
type QueryCodegenWriteInsert ¶
type QueryCodegenWriteInsert struct {
Columns []string `json:"columns,omitempty" yaml:"columns,omitempty"`
}
type QueryCodegenWriteUpdate ¶
type QueryCodegenWriteUpdate struct {
Columns []string `json:"columns,omitempty" yaml:"columns,omitempty"`
}
type Table ¶
type Table = spanalyzer.Table
type TypeSpec ¶
type TypeSpec = spanalyzer.TypeSpec
Click to show internal directories.
Click to hide internal directories.