Closed kevinresol closed 3 years ago
Modified from the fromSubquery test
fromSubquery
public function fromComplexSubquery() { return db .from({sub: db.Post.select({maxId: max(Post.id), renamed: Post.author}).groupBy(fields -> [fields.author])}) .join(db.User).on(User.id == sub.renamed) .first() .next(function(row) { return assert(true); }); }
Firstly, ExprType is not provided to Field's constructor: https://github.com/haxetink/tink_sql/blob/9922d2d10d12e0cbd941d2235e69078db4eb2b3e/src/tink/sql/macros/Targets.hx#L31
ExprType
Field
Secondly, compiler complains sub.renamed with Table2_Fields has no field renamed
sub.renamed
Table2_Fields has no field renamed
Modified from the
fromSubquery
testFirstly,
ExprType
is not provided toField
's constructor: https://github.com/haxetink/tink_sql/blob/9922d2d10d12e0cbd941d2235e69078db4eb2b3e/src/tink/sql/macros/Targets.hx#L31Secondly, compiler complains
sub.renamed
withTable2_Fields has no field renamed