gormpinot

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package gormpinot provides a GORM dialector that executes Pinot SQL over HTTP.

Limitations:

  • Read-only: INSERT/UPDATE/DELETE/DDL are not supported.
  • Migrations are not supported.
  • Broker selection uses Config.DefaultTable when provided; otherwise a best-effort table name is inferred from the SQL or an empty table name is used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(config Config) gorm.Dialector

Open returns a GORM dialector configured for Pinot.

Types

type Config

type Config struct {
	Conn         *pinot.Connection
	DefaultTable string
}

Config configures the Pinot GORM dialector.

type Dialector

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

Dialector is the GORM dialector for Pinot.

func (Dialector) BindVarTo

func (Dialector) BindVarTo(writer clause.Writer, _ *gorm.Statement, _ interface{})

BindVarTo writes a placeholder.

func (Dialector) DataTypeOf

func (Dialector) DataTypeOf(*schema.Field) string

DataTypeOf returns an empty datatype since migrations are unsupported.

func (Dialector) DefaultValueOf

func (Dialector) DefaultValueOf(*schema.Field) clause.Expression

DefaultValueOf returns DEFAULT for compatibility.

func (Dialector) Explain

func (Dialector) Explain(sql string, vars ...interface{}) string

Explain returns SQL with rendered parameters for logging.

func (Dialector) Initialize

func (d Dialector) Initialize(db *gorm.DB) error

Initialize wires the dialector into the GORM DB instance.

func (Dialector) Migrator

func (Dialector) Migrator(db *gorm.DB) gorm.Migrator

Migrator returns a migrator that rejects schema operations.

func (Dialector) Name

func (Dialector) Name() string

Name returns the dialector name.

func (Dialector) QuoteTo

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

QuoteTo quotes identifiers with double quotes.

Jump to

Keyboard shortcuts

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