tdengine_gorm

package module
v0.0.0-...-845c3dc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 11 Imported by: 0

README

TDengine Gorm Dialect

Go.Dev reference codecov Tests Go Report Card Licence Tag

Instructions

Not support migrate, update, deletion and transaction

Add clauses

  • "CREATE TABLE"
  • "FILL"
  • "SLIMIT"
  • "USING"
  • "WINDOW"

EXAMPLE

Check example code example

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDriverName = "taosSql"

Functions

func Open

func Open(dsn string) gorm.Dialector

Types

type Column

type Column struct {
	// contains filtered or unexported fields
}

func (Column) DatabaseTypeName

func (c Column) DatabaseTypeName() string

func (Column) DecimalSize

func (c Column) DecimalSize() (precision int64, scale int64, ok bool)

func (Column) Length

func (c Column) Length() (length int64, ok bool)

func (Column) Name

func (c Column) Name() string

func (Column) Nullable

func (c Column) Nullable() (nullable bool, ok bool)

type Dialect

type Dialect struct {
	DriverName string
	DSN        string
	Conn       gorm.ConnPool
}

func (Dialect) BindVarTo

func (Dialect) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v any)

func (Dialect) ClauseBuilders

func (Dialect) ClauseBuilders() map[string]clause.ClauseBuilder

func (Dialect) DataTypeOf

func (Dialect) DataTypeOf(field *schema.Field) string

func (Dialect) DefaultValueOf

func (Dialect) DefaultValueOf(field *schema.Field) clause.Expression

func (Dialect) Explain

func (Dialect) Explain(sql string, vars ...any) string

func (Dialect) Initialize

func (dialect Dialect) Initialize(db *gorm.DB) (err error)

func (Dialect) Migrator

func (dialect Dialect) Migrator(db *gorm.DB) gorm.Migrator

func (Dialect) Name

func (Dialect) Name() string

func (Dialect) QuoteTo

func (Dialect) QuoteTo(writer clause.Writer, str string)

func (Dialect) RollbackTo

func (Dialect) RollbackTo(tx *gorm.DB, name string) error

func (Dialect) SavePoint

func (Dialect) SavePoint(tx *gorm.DB, name string) error

type Migrator

type Migrator struct {
	migrator.Migrator
	// contains filtered or unexported fields
}

func (Migrator) AlterColumn

func (m Migrator) AlterColumn(value any, field string) error

func (Migrator) AutoMigrate

func (m Migrator) AutoMigrate(values ...any) error

func (Migrator) DropConstraint

func (m Migrator) DropConstraint(value any, name string) error

func (Migrator) FullDataTypeOf

func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr)

func (Migrator) RenameColumn

func (m Migrator) RenameColumn(value any, oldName, newName string) error

func (Migrator) RenameIndex

func (m Migrator) RenameIndex(value any, oldName, newName string) error

Directories

Path Synopsis
clause

Jump to

Keyboard shortcuts

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