Files
relspecgo/pkg/writers/dctx/writer.go
Hein 7c7054d2e2
Some checks are pending
CI / Test (1.23) (push) Waiting to run
CI / Test (1.24) (push) Waiting to run
CI / Test (1.25) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build (push) Waiting to run
So far so good
2025-12-16 18:10:40 +02:00

37 lines
1.2 KiB
Go

package dctx
import (
"fmt"
"git.warky.dev/wdevs/relspecgo/pkg/models"
"git.warky.dev/wdevs/relspecgo/pkg/writers"
)
// Writer implements the writers.Writer interface for DCTX format
// Note: DCTX is a read-only format used for loading Clarion dictionary files
type Writer struct {
options *writers.WriterOptions
}
// NewWriter creates a new DCTX writer with the given options
func NewWriter(options *writers.WriterOptions) *Writer {
return &Writer{
options: options,
}
}
// WriteDatabase returns an error as DCTX format is read-only
func (w *Writer) WriteDatabase(db *models.Database) error {
return fmt.Errorf("DCTX format is read-only and does not support writing - it is used for loading Clarion dictionary files only")
}
// WriteSchema returns an error as DCTX format is read-only
func (w *Writer) WriteSchema(schema *models.Schema) error {
return fmt.Errorf("DCTX format is read-only and does not support writing - it is used for loading Clarion dictionary files only")
}
// WriteTable returns an error as DCTX format is read-only
func (w *Writer) WriteTable(table *models.Table) error {
return fmt.Errorf("DCTX format is read-only and does not support writing - it is used for loading Clarion dictionary files only")
}