Skip to content

Instantly share code, notes, and snippets.

View marius-se's full-sized avatar
💧
Be water my friend

Marius Seufzer marius-se

💧
Be water my friend
View GitHub Profile
@marius-se
marius-se / Vector.swift
Last active May 29, 2024 02:40
Swift PGVector
import PostgresNIO
import Foundation
/// A vector of floats. This is a custom type mirroring the `vector` type from
/// [pgvector](https://github.com/pgvector/pgvector/).
struct Vector: Codable {
/// The vector's values.
let value: [Float]
/// Creates a new `Vector`.