What would be the best way to use JDBC and UUIDs?
Since the only interface between the java codebase and postgres RDBMS is
trough the pl/pgsql functions, shall I write my functions to accept
varchars, and there convert them to uuids, same thing for returning
UUIDS to java?
Mike
Mario Splivalo wrote: > What would be the best way to use JDBC and UUIDs? > > Since the only interface between the java codebase and postgres RDBMS is > trough the pl/pgsql functions, shall I write my functions to accept > varchars, and there convert them to uuids, same thing for returning > UUIDS to java? The best interface is text; you can (implicitly) cast UUID to text (or char or varchar) and vice versa. So you can for example just use java.sql.PreparedStatement.setString() to set an UUID. Yours, Laurenz Albe
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера