Skip to content

Instantly share code, notes, and snippets.

View yahorbarkouski's full-sized avatar
🚁

Yahor Barkouski yahorbarkouski

🚁
View GitHub Profile
@yahorbarkouski
yahorbarkouski / PGVectorBinding.kt
Last active March 27, 2024 16:54
Binding pgvector::vector type to List<Double> using jOOQ
import org.jooq.*
import org.jooq.impl.DSL
import java.sql.SQLFeatureNotSupportedException
import java.sql.Types
@Suppress("UNCHECKED_CAST")
class PGVectorBinding : Binding<Any, List<Double>> {
override fun converter(): Converter<Any, List<Double>> {
return object : Converter<Any, List<Double>> {
"use client";
import {
Dialog,
DialogContent,
DialogTitle,
DialogTrigger
} from "@/components/ui/dialog";
import useDragDrop from "@/hooks/useDragDrop";
import { cn, formatBytes } from "@/lib/utils";