37 lines
1.2 KiB
Go
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")
|
|
}
|