Documentation ¶
Index ¶
- Constants
- func CloudEventToSlice(event *cloudevent.CloudEventHeader) []any
- func CloudEventToSliceWithKey(event *cloudevent.CloudEventHeader, key string) []any
- func IndexToSlice(origIndex *nameindexer.Index) ([]any, error)
- func IndexToSliceWithKey(index *nameindexer.Index, key string) []any
- func UnmarshalCloudEventSlice(jsonArray []byte) ([]any, error)
- func UnmarshalIndexSlice(jsonArray []byte) ([]any, error)
Constants ¶
const ( // TableName is the name of the table in Clickhouse. TableName = "cloud_event" // SubjectColumn is the name of the subject column in Clickhouse. SubjectColumn = "subject" // TimestampColumn is the name of the timestamp column in Clickhouse. TimestampColumn = "event_time" // TypeColumn is the name of the cloud event type column in Clickhouse. TypeColumn = "event_type" // IDColumn is the name of the ID column in Clickhouse. IDColumn = "id" // SourceColumn is the name of the source column in Clickhouse. SourceColumn = "source" // ProducerColumn is the name of the producer column in Clickhouse. ProducerColumn = "producer" // DataContentTypeColumn is the name of the data content type column in Clickhouse. DataContentTypeColumn = "data_content_type" // DataVersionColumn is the name of the data version column in Clickhouse. DataVersionColumn = "data_version" // ExtraColumn is the name of the extra column in Clickhouse. ExtrasColumn = "extras" // IndexKeyColumn is the name of the index name column in Clickhouse. IndexKeyColumn = "index_key" // InsertStmt is the SQL statement for inserting a row into Clickhouse. InsertStmt = "INSERT INTO " + TableName + " (" + SubjectColumn + ", " + TimestampColumn + ", " + TypeColumn + ", " + IDColumn + ", " + SourceColumn + ", " + ProducerColumn + ", " + DataContentTypeColumn + ", " + DataVersionColumn + ", " + ExtrasColumn + ", " + IndexKeyColumn + ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" )
Variables ¶
This section is empty.
Functions ¶
func CloudEventToSlice ¶ added in v0.1.0
func CloudEventToSlice(event *cloudevent.CloudEventHeader) []any
CloudEventToSlice converts a CloudEvent to an array of any for Clickhouse insertion. The order of the elements in the array match the order of the columns in the table.
func CloudEventToSliceWithKey ¶ added in v0.1.0
func CloudEventToSliceWithKey(event *cloudevent.CloudEventHeader, key string) []any
CloudEventToSlice converts a CloudEvent to an array of any for Clickhouse insertion. The order of the elements in the array match the order of the columns in the table.
func IndexToSlice ¶
func IndexToSlice(origIndex *nameindexer.Index) ([]any, error)
IndexToSlice converts a Inedx to an array of any for Clickhouse insertion. The order of the elements in the array match the order of the columns in the table.
func IndexToSliceWithKey ¶ added in v0.0.12
func IndexToSliceWithKey(index *nameindexer.Index, key string) []any
IndexToSliceWithKey converts a Inedx to an array of any for Clickhouse insertion. This function allows to pass the key as a parameter instead of encoding it from the index.
func UnmarshalCloudEventSlice ¶ added in v0.1.0
UnmarshalCloudEventSlice unmarshals a byte slice into an array of any for Clickhouse insertion.
func UnmarshalIndexSlice ¶ added in v0.0.13
UnmarshalIndexSlice unmarshals a byte slice into an array of any for Clickhouse insertion.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package indexrepo contains service code for gettting and managing indexed objects.
|
Package indexrepo contains service code for gettting and managing indexed objects. |
Code generated by "clickhouse-infra" DO NOT EDIT.
|
Code generated by "clickhouse-infra" DO NOT EDIT. |