ddl

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

DDL Generator

TODO:

  • Enum generation
  • DSL for enum
  • DSL for compression codecs
  • Go code generation
    • Enums
    • Table helper initialization

Migrations

Should support migrations on later stages of development via ALTER TABLE statements.

Documentation

Overview

Package ddl provides facilities for generating DDL statements and auxiliary code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backtick

func Backtick(s string) string

Backtick adds backticks to the string.

func Generate

func Generate(table Table) (string, error)

Generate DDL without CREATE TABLE statement.

Types

type Column

type Column struct {
	Name  string
	Type  proto.ColumnType
	Codec proto.ColumnType
}

Column of Table.

type Table

type Table struct {
	Name        string
	Columns     []Column
	OrderBy     []string
	PrimaryKey  []string
	PartitionBy string
	Engine      string
}

Table description.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL