<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Jdbc on Robin's blog</title><link>https://kaveland.no/tags/jdbc/</link><description>Recent content in Jdbc on Robin's blog</description><generator>Hugo -- 0.145.0</generator><language>en-us</language><lastBuildDate>Sat, 21 Sep 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://kaveland.no/tags/jdbc/index.xml" rel="self" type="application/rss+xml"/><item><title>Consider using array operators over the SQL in operator</title><link>https://kaveland.no/posts/2024-09-21-equals-any-over-where-in/</link><pubDate>Sat, 21 Sep 2024 00:00:00 +0000</pubDate><guid>https://kaveland.no/posts/2024-09-21-equals-any-over-where-in/</guid><description>&lt;p>In my post about &lt;a href="https://kaveland.no/posts/2024-08-30-multi-selecting-by-composite-key/">batch operations&lt;/a>, I used the
&lt;code>where id = any(:ids)&lt;/code> pattern, with &lt;code>ids&lt;/code> bound to a JDBC array. I&amp;rsquo;ve gotten questions about that
afterwards, asking why I do it like that, instead of using &lt;code>in (:id1, :id2, ...)&lt;/code>. Many libraries
can take care of the dynamic SQL generation for you, so often you can just write &lt;code>in (:ids)&lt;/code>, just
like the array example. I would still prefer to use the &lt;code>= any(:ids)&lt;/code> pattern, and I decided to write
down my reasoning here.&lt;/p></description></item><item><title>Batch operations using composite keys in postgres over jdbc</title><link>https://kaveland.no/posts/2024-08-30-multi-selecting-by-composite-key/</link><pubDate>Fri, 30 Aug 2024 00:00:00 +0000</pubDate><guid>https://kaveland.no/posts/2024-08-30-multi-selecting-by-composite-key/</guid><description>&lt;p>Throughout a career as a software developer, you encounter many patterns. Some appear just often
enough to remember that they exist, but you still need to look them up every time. I&amp;rsquo;ve discovered
that writing things down helps me remember them more easily. This particular pattern is very useful
for my current project. So, it&amp;rsquo;s time to write it down and hopefully commit it to memory properly
this time. Although this post is specific to PostgreSQL, I&amp;rsquo;m sure other databases have the necessary
features to achieve the same results efficiently.&lt;/p></description></item></channel></rss>