-
-
Save KadekM/5c0cd96b9a0cab1c87249ad90974f2dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def updatePartitionCommand(partitions: List[(String, Long)]) = { | |
val enc = (varchar ~ int8).values.list(partitions) | |
sql"""INSERT INTO offsets (topic, "offset") | |
VALUES $enc | |
ON CONFLICT (topic) DO UPDATE | |
SET "offset"=EXCLUDED."offset"""".command | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment