{"modulePath":"github.com/cloudquery/plugin-sdk/v4","version":"v4.100.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package transformers\n\n## Constants\n\n```go\nconst DefaultMaxJSONTypeSchemaDepth = 4\n```\n\n## Functions\n\n```go\nfunc Apply(tables schema.Tables, extraTransformers ...schema.Transform) error\n```\nApply applies the given transformers to the given Tables, and recursively on the relations. This is useful for applying transformers that are not defined in the table definitions. To apply the table-definition transformers, use TransformTables.\n\n```go\nfunc DefaultIgnoreInTestsTransformer(_ reflect.StructField) bool\n```\n\n```go\nfunc DefaultJSONColumnSchemaNameTransformer(field reflect.StructField) (string, error)\n```\n\n```go\nfunc DefaultNameTransformer(field reflect.StructField) (string, error)\n```\n\n```go\nfunc DefaultNullableFieldTransformer(_ reflect.StructField) bool\n```\n\n```go\nfunc DefaultResolverTransformer(_ reflect.StructField, path string) schema.ColumnResolver\n```\n\n```go\nfunc DefaultTypeTransformer(v reflect.StructField) (arrow.DataType, error)\n```\n\n```go\nfunc SetParents(tables schema.Tables, parent *schema.Table)\n```\nSet parent links on relational tables\n\n```go\nfunc TransformTables(tables schema.Tables) error\n```\nTransformTables runs given Tables' transformers as defined in the table definitions, and recursively on the relations. To apply additional transformers, use Apply.\n\n```go\nfunc TransformWithStruct(st any, opts ...StructTransformerOption) schema.Transform\n```\n\n## Types\n\n```go\ntype IgnoreInTestsTransformer func(field reflect.StructField) bool\n```\n\n```go\ntype NameTransformer func(reflect.StructField) (string, error)\n```\n\n```go\ntype NullableFieldTransformer func(field reflect.StructField) bool\n```\n\n```go\ntype ResolverTransformer func(field reflect.StructField, path string) schema.ColumnResolver\n```\n\n```go\ntype StructTransformerOption func(*structTransformer)\n```\n\n```go\nfunc WithIgnoreInTestsTransformer(transformer IgnoreInTestsTransformer) StructTransformerOption\n```\nWithIgnoreInTestsTransformer overrides how column ignoreInTests will be determined. DefaultIgnoreInTestsTransformer is used as the default.\n\n```go\nfunc WithJSONSchemaNameTransformer(transformer NameTransformer) StructTransformerOption\n```\nWithJSONSchemaNameTransformer overrides how column name will be determined. DefaultJSONColumnSchemaNameTransformer is used as the default.\n\n```go\nfunc WithMaxJSONTypeSchemaDepth(maxDepth int) StructTransformerOption\n```\nWithMaxJSONTypeSchemaDepth allows to specify the maximum depth of JSON type schema\n\n```go\nfunc WithNameTransformer(transformer NameTransformer) StructTransformerOption\n```\nWithNameTransformer overrides how column name will be determined. DefaultNameTransformer is used as the default.\n\n```go\nfunc WithNullableFieldTransformer(transformer NullableFieldTransformer) StructTransformerOption\n```\nWithNullableFieldTransformer overrides how column NotNull will be determined. DefaultNullableFieldTransformer is used as the default.\n\n```go\nfunc WithPrimaryKeyComponents(fields ...string) StructTransformerOption\n```\nWithPrimaryKeyComponents allows to specify what struct fields should be used as primary key components\n\n```go\nfunc WithPrimaryKeys(fields ...string) StructTransformerOption\n```\nWithPrimaryKeys allows to specify what struct fields should be used as primary keys\n\n```go\nfunc WithResolverTransformer(transformer ResolverTransformer) StructTransformerOption\n```\nWithResolverTransformer overrides how column resolver will be determined. DefaultResolverTransformer is used as the default.\n\n```go\nfunc WithSkipFields(fields ...string) StructTransformerOption\n```\nWithSkipFields allows to specify what struct fields should be skipped.\n\n```go\nfunc WithSkipPrimaryKeyValidation(fields ...string) StructTransformerOption\n```\n\n```go\nfunc WithTypeTransformer(transformer TypeTransformer) StructTransformerOption\n```\nWithTypeTransformer overrides how column type will be determined. DefaultTypeTransformer is used as the default.\n\n```go\nfunc WithUnwrapAllEmbeddedStructs() StructTransformerOption\n```\nWithUnwrapAllEmbeddedStructs instructs codegen to unwrap all embedded fields (1 level deep only)\n\n```go\nfunc WithUnwrapStructFields(fields ...string) StructTransformerOption\n```\nWithUnwrapStructFields allows to unwrap specific struct fields (1 level deep only)\n\n```go\ntype TypeTransformer func(reflect.StructField) (arrow.DataType, error)\n```\n\n","path":"github.com/cloudquery/plugin-sdk/v4/transformers","name":"transformers","synopsis":"","isRedistributable":true}
