Unified Storage: in SQL template, also handle output data, improve API, examples and docs (#87560)
* preview of work so far * stylistic improvements * fix linters * remove golden tests, they may cause the system to be too rigid to changes * remove unnecessary code for golden tests * remove white space mangling in Execute * also handle output data, improve API, examples and docs * add helper methods * fix interface
This commit is contained in:
@@ -29,7 +29,7 @@ type Dialect interface {
|
||||
// SELECT *
|
||||
// FROM mytab
|
||||
// WHERE id = ?
|
||||
// {{ .SelectFor Update NoWait }}; -- will be uppercased
|
||||
// {{ .SelectFor "Update NoWait" }}; -- will be uppercased
|
||||
SelectFor(...string) (string, error)
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ func (rlc rowLockingClauseAll) SelectFor(s ...string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
return string(o), nil
|
||||
return "FOR " + string(o), nil
|
||||
}
|
||||
|
||||
// standardIdent provides standard SQL escaping of identifiers.
|
||||
|
||||
Reference in New Issue
Block a user