Documentation
¶
Index ¶
- type ConversionResult
- type ConvertRequest
- type ConvertTraceRequest
- type DefaultService
- func (s *DefaultService) ConvertFromFile(ctx context.Context, req ConvertTraceRequest) (*ConversionResult, error)
- func (s *DefaultService) ConvertSchemaFromFile(ctx context.Context, req ConvertRequest) error
- func (s *DefaultService) ConvertStreamingly(ctx context.Context, tracePath string, bufferSize int, ...) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversionResult ¶
type ConversionResult struct {
Traces []models.SQLTrace
Templates []models.SQLTemplate
}
ConversionResult holds the result of a trace conversion.
type ConvertRequest ¶
type ConvertRequest struct {
SourceSchemaPath string
TargetDBType string
OutputPath string
SourceDB string // Optional, will be auto-detected if empty
}
ConvertRequest represents a request to convert a schema.
type ConvertTraceRequest ¶
ConvertTraceRequest represents a request to convert traces.
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
DefaultService is the default implementation of the conversion service.
func (*DefaultService) ConvertFromFile ¶
func (s *DefaultService) ConvertFromFile(ctx context.Context, req ConvertTraceRequest) (*ConversionResult, error)
ConvertFromFile reads SQL traces from a file, optionally translates them, and converts them to templates.
func (*DefaultService) ConvertSchemaFromFile ¶
func (s *DefaultService) ConvertSchemaFromFile(ctx context.Context, req ConvertRequest) error
ConvertSchemaFromFile reads a SQL schema file, converts it to the target dialect, and writes the result.
type Service ¶
type Service interface {
ConvertFromFile(ctx context.Context, req ConvertTraceRequest) (*ConversionResult, error)
ConvertSchemaFromFile(ctx context.Context, req ConvertRequest) error
ConvertStreamingly(ctx context.Context, tracePath string, bufferSize int, callback func(models.SQLTrace) error) error
}
Service is the interface for the conversion service.
func NewService ¶
func NewService(parser services.Parser, registry *plugin_registry.Registry) Service
NewService creates a new DefaultService.
Click to show internal directories.
Click to hide internal directories.