@@ -360,31 +360,31 @@ async def test_nested_structures(conn):
360360 )
361361
362362
363- async def test_limit_by_with_order_by (conn , table_smt ):
363+ async def test_limit_by_with_order_by (conn , table_mt ):
364364 await conn .execute (
365- table_smt .insert (),
365+ table_mt .insert (),
366366 [
367- {'key ' : 1 , 'value ' : 13 },
368- {'key ' : 1 , 'value ' : 12 },
369- {'key ' : 1 , 'value ' : 11 },
370- {'key ' : 2 , 'value ' : 21 },
371- {'key ' : 2 , 'value ' : 22 },
367+ {'num ' : 1 , 'title ' : '13' },
368+ {'num ' : 1 , 'title ' : '12' },
369+ {'num ' : 1 , 'title ' : '11' },
370+ {'num ' : 2 , 'title ' : '21' },
371+ {'num ' : 2 , 'title ' : '22' },
372372 ],
373373 )
374374
375375 query = (
376- aiochsa .select ([table_smt .c .value ])
377- .order_by (table_smt .c .key , table_smt .c .value )
376+ aiochsa .select ([table_mt .c .title ])
377+ .order_by (table_mt .c .num , table_mt .c .title )
378378 )
379379 rows = await conn .fetch (
380- query .limit_by (table_smt .c .key , limit = 2 )
380+ query .limit_by (table_mt .c .num , limit = 2 )
381381 )
382- assert [value for (value ,) in rows ] == [11 , 12 , 21 , 22 ]
382+ assert [title for (title ,) in rows ] == ['11' , '12' , '21' , '22' ]
383383
384384 rows = await conn .fetch (
385- query .limit_by (table_smt .c .key , offset = 1 , limit = 1 )
385+ query .limit_by (table_mt .c .num , offset = 1 , limit = 1 )
386386 )
387- assert [value for (value ,) in rows ] == [12 , 22 ]
387+ assert [title for (title ,) in rows ] == ['12' , '22' ]
388388
389389
390390async def test_limit_by_without_order_by (conn , table_smt ):
0 commit comments