Load a default written out in every position, refuse null outside a column again, read a field once per alternation, refuse an empty segment in the CLI's lone reference, and hold a declared datatype as one value
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ type columnRead struct {
|
||||
// or name, and nil where it does not or t declares a string, which reads the column as text.
|
||||
func columnReadOf(t *template, targets map[*nameBinding]nameTarget) *columnRead {
|
||||
ops := t.compiled.ops
|
||||
if t.declared && t.datatype == DataTypeString || t.repeat != 1 || len(ops) != 1 || ops[0].Kind != grammar.PathRead || len(ops[0].arms) != 1 {
|
||||
if t.datatype != nil && *t.datatype == DataTypeString || t.repeat != 1 || len(ops) != 1 || ops[0].Kind != grammar.PathRead || len(ops[0].arms) != 1 {
|
||||
return nil
|
||||
}
|
||||
a := ops[0].arms[0]
|
||||
|
||||
Reference in New Issue
Block a user