Versions in this module Expand all Collapse all v1 v1.9.0 Mar 9, 2026 Changes in this version + const DefaultBatchSize + const DefaultDatabaseName + const DefaultFlushInterval + const DefaultTableName + const EnvConnectionString + func Register(dbType DatabaseType, factory databaseFactory) + type Config struct + BatchSize int + ConnectionString string + DatabaseName string + FlushInterval time.Duration + OmitRaw bool + TableName string + Type DatabaseType + func LoadConfigFromFile(configPath string) (*Config, error) + func (c *Config) ApplyDefaults() + func (c *Config) Validate() error + type Database interface + Close func() error + Connect func(ctx context.Context) error + EnsureSchema func(ctx context.Context) error + InsertBatch func(ctx context.Context, results []runner.Result) error + Type func() DatabaseType + func NewDatabase(cfg *Config) (Database, error) + type DatabaseType string + const MongoDB + const MySQL + const PostgreSQL + func SupportedDatabases() []DatabaseType + func (d DatabaseType) IsValid() bool + func (d DatabaseType) String() string + type Options struct + BatchSize int + ConfigFile string + ConnectionString string + DatabaseName string + Enabled bool + OmitRaw bool + TableName string + Type string + func (o *Options) ToConfig() (*Config, error) + type Writer struct + func NewWriter(ctx context.Context, cfg *Config) (*Writer, error) + func (w *Writer) Close() + func (w *Writer) GetWriterCallback() runner.OnResultCallback + func (w *Writer) Stats() int64