Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Meh...

    await using cn = await pool.connect();
    const records = await cn.query<MyType>`
      SELECT ...
      FROM ...
      WHERE ...
    `;
    for await (const record of records) {
      ...
    }
Oh, spring is so much better...


Spring version:

  var records = jdbcClient
     .sql("select * from posts")
     .query(Post.class)
     .toList();
     
  records.forEach(p -> ...);


I'm not seeing a RecordsRequestFactoryHandlerProviderFactory in there... maybe it's not as bad as I remember.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: