{"modulePath":"github.com/viant/datly","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package rowcodec\n\nPackage rowcodec compiles column codecs into typed SQLX scan wrappers.\n\n## Types\n\n```go\ntype Config struct {\n\tRowType    reflect.Type\n\tColumns    []*data.Column\n\tFactory    xcodec.Factory\n\tLookupType func(string) (reflect.Type, error)\n\tResources  fs.FS\n}\n```\n\n```go\ntype Decoder struct {\n\t// contains filtered or unexported fields\n}\n```\nDecoder is per-query state. SQLX owns both scan destinations and cache bytes.\n\n```go\nfunc (d *Decoder) Decode(ctx context.Context, row any) (any, error)\n```\n\n```go\nfunc (d *Decoder) FieldIndexes() ([][]int, error)\n```\nFieldIndexes translates the actual native scan mapping through this codec's already-compiled target accessors. Virtual Raw/Shadow wrapper fields never escape as model-field evidence.\n\n```go\nfunc (d *Decoder) NewRow() any\n```\n\n```go\nfunc (d *Decoder) Observe(columns []sqlxio.Column) error\n```\nObserve delegates field identity to SQLX's matcher; no mapping is replaced.\n\n```go\nfunc (d *Decoder) Rebind(row, actual any) error\n```\nRebind points a buffered scan row at its final collector slot after a value slice may have grown. Decode still owns conversion and field assignment.\n\n```go\ntype Plan struct {\n\t// contains filtered or unexported fields\n}\n```\nPlan contains immutable source/destination contracts; Decode state is per read.\n\n```go\nfunc Compile(config Config) (*Plan, error)\n```\n\n```go\nfunc (p *Plan) ModelType() reflect.Type\n```\n\n```go\nfunc (p *Plan) NewDecoder(newActual func() any, options ...xcodec.Option) *Decoder\n```\n\n","path":"github.com/viant/datly/sql/reader/rowcodec","name":"rowcodec","synopsis":"Package rowcodec compiles column codecs into typed SQLX scan wrappers.","isRedistributable":true}
