mirror of
				https://github.com/chaisql/chai.git
				synced 2025-10-31 10:56:22 +08:00 
			
		
		
		
	db: introduce row type
This commit is contained in:
		| @@ -12,7 +12,7 @@ import ( | ||||
| // A ScalarDefinition is the definition type for functions which operates on scalar values in contrast to other SQL functions | ||||
| // such as the SUM aggregator which operates on expressions instead. | ||||
| // | ||||
| // This difference allows to simply define them with a CallFn function that takes multiple document.Value and | ||||
| // This difference allows to simply define them with a CallFn function that takes multiple object.Value and | ||||
| // return another types.Value, rather than having to manually evaluate expressions (see Definition). | ||||
| type ScalarDefinition struct { | ||||
| 	name   string | ||||
| @@ -61,7 +61,7 @@ type ScalarFunction struct { | ||||
| 	params []expr.Expr | ||||
| } | ||||
|  | ||||
| // Eval returns a document.Value based on the given environment and the underlying function | ||||
| // Eval returns a object.Value based on the given environment and the underlying function | ||||
| // definition. | ||||
| func (sf *ScalarFunction) Eval(env *environment.Environment) (types.Value, error) { | ||||
| 	args, err := sf.evalParams(env) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Asdine El Hrychy
					Asdine El Hrychy