Add support for subqueries
This commit is contained in:
18
app/index.ts
18
app/index.ts
@@ -18,21 +18,3 @@ await scaffolding.up()
|
||||
*/
|
||||
const app = make(Application, units)
|
||||
await app.run()
|
||||
|
||||
import UserModel from './models/User.model.ts'
|
||||
import ObjectResultOperator from "../orm/src/builder/type/result/ObjectResultOperator.ts";
|
||||
// const users = await UserModel.find_one({ username: 'garrettmills' })
|
||||
|
||||
const sel = UserModel.select('*').with('login_attempts').where('username', '=', 'garrettmills')
|
||||
console.log(sel)
|
||||
console.log(sel.clone())
|
||||
const gm = await sel.results().first()
|
||||
|
||||
console.log(gm)
|
||||
|
||||
const la = (await gm.login_attempts()).first()
|
||||
console.log(la)
|
||||
|
||||
console.log(await la.user())
|
||||
|
||||
// console.log(await las.fetchRelated())
|
||||
|
||||
Reference in New Issue
Block a user