oceanbase

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package oceanbase adapts an OceanBase database (MySQL protocol) to the core interfaces. It reuses the mysql provider's Adapter and Introspector, and implements its own EXPLAIN parser (OceanBase's plan JSON differs from MySQL, and varies by version; the parser degrades to ScanUnknown on any surprise rather than panicking).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect struct{}

Dialect is the OceanBase dialect. OceanBase speaks the MySQL wire protocol and reuses its quoting/placeholder rules. Distributed plans make estimates harder to trust, so the gate relies on ob_query_timeout + max_read_size (a runtime scan-row hard cap independent of estimates) + tenant resource isolation.

func (Dialect) Capabilities

func (Dialect) Capabilities() dialect.Capabilities

func (Dialect) Name

func (Dialect) Name() string

func (Dialect) Placeholder

func (Dialect) Placeholder(i int) string

func (Dialect) QuoteIdent

func (Dialect) QuoteIdent(name string) string

type Provider

type Provider struct{ sqladapter.Base }

Provider adapts an OceanBase database to the core interfaces.

func NewWithTimeout

func NewWithTimeout(dsn string, timeout time.Duration) (*Provider, error)

NewWithTimeout opens an OceanBase database (MySQL-protocol DSN) with a DB-native query timeout and assembles the core adapters.

func Open added in v0.1.11

func Open(dsn string, opts providerregistry.Options) (*Provider, error)

Open opens OceanBase with opts (see mysql.NewAdapter).

Jump to

Keyboard shortcuts

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