package
0.0.0-20220127160557-8b3bc450087d
Repository: https://github.com/estuary/protocols.git
Documentation: pkg.go.dev

# Functions

Backticks returns a wrapper function with a single backtick character on the both the Left and the Right.
ColumnForProjection returns a Column that is appropriate for storing values from the given Projection.
DefaultFlowTables returns the default Flow *Table configurations and names with optional prefix.
DoubleQuotes returns a wrapper function with a single double quote character on the both the Left and the Right.
DumpTables is a convenience for testing which dumps the contents of the given tables into a debug string suitable for snapshotting.
FlowCheckpointsTable returns the Table description for the table that holds the checkpoint and nonce values for each materialization shard.
FlowMaterializationsTable returns the Table description for the table that holds the MaterializationSpec that corresponds to each target table.
Identity is an identity function for no-op conversions of tuple elements to `interface{}` values that are suitable for use as sql parameters.
LineComment returns a CommentConfig configured for standard sql line comments that begins each line with a double dash ("-- ").
LineCommentRenderer returns a per line comment valid for standard SQL.
NewRenderer returns a configured renderer instance.
NewStdEndpoint composes a new StdEndpoint suitable for sql.DB compatible databases.
NewTokenPair returns a TokenPair with the left and right tokens specified.
PostgresParameterPlaceholder returns $N style parameters where N is the parameter number starting at 1.
PostgresSQLGenerator returns a SQLGenerator for the postgresql SQL dialect.
QuestionMarkPlaceholder returns the constant string "?".
RawConstColumnType returns a ConstColumnType that always uses the given sql string as DDL and performs a no-op value conversion.
SingleQuotesWrapper returns a wrapper function with one single quote character on the both the Left and the Right.
SQLiteSQLGenerator returns a SQLGenerator for the sqlite SQL dialect.
TableForMaterialization converts a MaterializationSpec into the Table representation that's used by Generator.
ValidateMatchesExisting returns a set of constraints to use when there is a new proposed CollectionSpec for a materialization that is already running, or has been Applied.
ValidateNewSQLProjections returns a set of constraints for a proposed flow collection for a **new** materialization (one that is not running and has never been Applied).
ValidateSelectedFields validates a proposed MaterializationSpec against a set of constraints.

# Constants

ColumnType constants that are used by ColumnTypeMapper.
ColumnType constants that are used by ColumnTypeMapper.
ColumnType constants that are used by ColumnTypeMapper.
DefaultFlowCheckpoints is the default table for checkpoints.
DefaultFlowMaterializations is the default table for materialization specs.
ColumnType constants that are used by ColumnTypeMapper.
ColumnType constants that are used by ColumnTypeMapper.
ColumnType constants that are used by ColumnTypeMapper.
ColumnType constants that are used by ColumnTypeMapper.
TypeLengthPlaceholder is the placeholder string that may appear in the SQL string, which will be replaced by the MaxLength of the string.

# Variables

DefaultQuoteSanitizer used for sanitizing fields in SQL.
DefaultUnwrappedIdentifiers is a SkipWrapper function that checks for identifiers that 1 typically do not need wrapping.

# Structs

Column describes a SQL table column that will hold JSON values.
CommentConfig determines how SQL comments are rendered.
CommentRenderer is used to render comments in SQL.
Driver implements the pm.DriverServer interface.
FlowTables is the table specifications for Flow.
Generator generates SQL for a large variety of SQL dialects using various configuration parameters.
MaxLengthableColumnType is a TypeMapper that supports column types that may have a length argument (e.g.
NullableTypeMapping wraps a TypeMapper to add "NULL" and/or "NOT NULL" to the generated SQL type depending on the nullability of the column.
Renderer is used for naming things inside of SQL.
ResolvedColumnType represents the result of successfully mapping a Column to SQL DDL and a function that can be used to convert a Tuple element into a type that is appropriate for the driver.
StdEndpoint is the *database/sql.DB standard implementation of an endpoint.
StdFence is an installed barrier in a shared checkpoints table which prevents other sessions from committing transactions under the fenced ID -- and prevents this Fence from committing where another session has in turn fenced this instance off.
StringTypeInfo holds optional additional type information for string columns.
StringTypeMapping is a special TypeMapper for string type columns, which can take the format and/or content type into account when deciding what sql column type to generate.
Table describes a database table, which can be used to generate various types of SQL statements.
TokenPair is a generic way of representing strings that can be used to surround some text for quoting and commenting.

# Interfaces

Endpoint is an sql compatible endpoint that allows dialect specific tasks and generators.
Fence is an installed barrier in a shared checkpoints table which prevents other sessions from committing transactions under the fenced ID -- and prevents this Fence from committing where another session has in turn fenced this instance off.
Resource is a driver-provided type which represents the SQL resource (for example, a table) bound to by a binding.
A TypeMapper resolves a Column to a specific base SQL type.

# Type aliases

ColumnType represents a minimal set of database-agnostic types that we may try to store and query.
ColumnTypeMapper selects a specific TypeMapper based on the type of the data that will be passed to as a parameter for inserts or updates to the column.
ConstColumnType is a ResolvedColumnType that is known statically at compile time.
ExecFn executes a |sql| statement with |arguments|, and returns the number of rows affected.
LengthConstrainedColumnType is a TypeMapper that must always have a length argument, e.g.
ParametersConverter is a slice of functions that can be used to convert a Tuple into an []interface{} that can be passed to the database driver.
ResourcePath is '.'-separated path components of a fully qualified database resource.