()
| 33 | |
| 34 | it('simple query builder performance test', async () => { |
| 35 | function test() { |
| 36 | ctx.db |
| 37 | .selectFrom(['person as p', 'pet']) |
| 38 | .innerJoin('toy', 'toy.pet_id', 'pet.id') |
| 39 | .whereRef('p.id', '=', 'pet.owner_id') |
| 40 | .where('toy.id', '=', 1) |
| 41 | .where('p.id', 'in', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) |
| 42 | .where(({ exists, selectFrom }) => |
| 43 | exists( |
| 44 | selectFrom('toy_schema.toy').whereRef( |
| 45 | 'toy_schema.toy.id', |
| 46 | '=', |
| 47 | 'toy.id', |
| 48 | ), |
| 49 | ), |
| 50 | ) |
| 51 | .select([ |
| 52 | 'toy.price as price', |
| 53 | sql`concat(${sql.ref('first_name')}, ' ', ${sql.ref( |
| 54 | 'last_name', |
| 55 | )})`.as('full_name'), |
| 56 | ]) |
| 57 | .compile() |
| 58 | } |
| 59 | |
| 60 | const WARMUP_ROUNDS = 1000 |
| 61 | const TEST_ROUNDS = 100000 |
no test coverage detected
searching dependent graphs…