model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package model defines the generic, schema-less record shape that flows from a Source through the parser into a Target database. xpro-oss has no built-in knowledge of any particular XML schema — every field is driven by the column mapping in config.yaml.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name  string
	Value string
}

Column is one mapped output value.

type Record

type Record struct {
	// SourceName is the source-relative file/object name this record was read from.
	SourceName string

	// Columns holds one entry per configured mapping field, in mapping order.
	Columns []Column
}

Record is one parsed unit of work: the source file it came from and the mapped column values ready for insertion. The raw file content is not retained (a raw-XML column carries its own copy), so a batch of records does not pin every source file in memory.

func (Record) ColumnNames

func (r Record) ColumnNames() []string

ColumnNames returns the column names in mapping order.

func (Record) Values

func (r Record) Values() []any

Values returns the column values in mapping order, suitable for database/sql positional parameter binding.

Jump to

Keyboard shortcuts

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