Documentation ¶
Index ¶
- type Exporter
- type Map
- type SQL
- func (sql *SQL) Add(bundle *pathbuilder.Bundle, entity *wisski.Entity) (err error)
- func (sql *SQL) Begin(bundle *pathbuilder.Bundle, count int64) error
- func (*SQL) BundleTable(bundle *pathbuilder.Bundle) string
- func (sql *SQL) Close() error
- func (sql *SQL) CreateFieldTable(bundle *pathbuilder.Bundle, field pathbuilder.Field) error
- func (sql *SQL) End(bundle *pathbuilder.Bundle) error
- func (*SQL) FieldColumn(field pathbuilder.Field) string
- func (*SQL) FieldTable(bundle *pathbuilder.Bundle, field pathbuilder.Field) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter interface { io.Closer // Begin signals that count entities will be transmitted for the given bundle Begin(bundle *pathbuilder.Bundle, count int64) error // Add adds entities for the given bundle Add(bundle *pathbuilder.Bundle, entity *wisski.Entity) error // End signals that no more entities will be submitted for the given bundle End(bundle *pathbuilder.Bundle) error }
Exporter handles WissKI Entities
type Map ¶
Map implements an exporter that stores data inside a map.
type SQL ¶
type SQL struct { DB *sql.DB BatchSize int // BatchSize for top-level bundles MaxQueryVar int // Maximum number of query variables (overrides BatchSize) MakeFieldTables bool // create tables for field values (if false, they get joined with "seperator") Separator string // Seperator for database multi-valued fields // contains filtered or unexported fields }
SQL implements an exporter for storing data inside an sql database. TODO(twiesing): For now this only supports string-like fields.
func (*SQL) BundleTable ¶
func (*SQL) BundleTable(bundle *pathbuilder.Bundle) string
func (*SQL) CreateFieldTable ¶
func (sql *SQL) CreateFieldTable(bundle *pathbuilder.Bundle, field pathbuilder.Field) error
CreateFieldTable creates a table for the given field
func (*SQL) FieldColumn ¶
func (*SQL) FieldColumn(field pathbuilder.Field) string
func (*SQL) FieldTable ¶
func (*SQL) FieldTable(bundle *pathbuilder.Bundle, field pathbuilder.Field) string
Click to show internal directories.
Click to hide internal directories.