analyzer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package analyzer provides interfaces and implementations for analyzing SQL queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer interface {
	// Analyze extracts table effects from a SQL query
	Analyze(queryName, sql string) (string, error)
}

Analyzer defines the interface for SQL query analyzers

type DefaultFactory

type DefaultFactory struct{}

DefaultFactory is the default analyzer factory

func NewDefaultFactory

func NewDefaultFactory() *DefaultFactory

NewDefaultFactory creates a new default factory

func (*DefaultFactory) Create

func (f *DefaultFactory) Create(engine string) (Analyzer, error)

Create returns an analyzer for the specified engine

type Factory

type Factory interface {
	// Create returns an analyzer for the specified engine
	Create(engine string) (Analyzer, error)
}

Factory creates analyzers based on the database engine

type MySQLAnalyzer

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

MySQLAnalyzer analyzes MySQL queries

func NewMySQLAnalyzer

func NewMySQLAnalyzer() *MySQLAnalyzer

NewMySQLAnalyzer creates a new MySQL analyzer

func (*MySQLAnalyzer) Analyze

func (a *MySQLAnalyzer) Analyze(queryName, sql string) (string, error)

Analyze extracts table effects from a MySQL query

Jump to

Keyboard shortcuts

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