All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.db.utils.PgVectorUtils Maven / Gradle / Ivy

There is a newer version: 1.4.5
Show newest version
package com.litongjava.db.utils;

import java.sql.SQLException;

import org.postgresql.util.PGobject;

public class PgVectorUtils {

  public static PGobject getPgVector(String vectorString) {
    // 使用PGobject来设置vector类型
    PGobject nameVector = new PGobject();
    nameVector.setType("vector");
    try {
      nameVector.setValue(vectorString);
    } catch (SQLException e) {
      throw new RuntimeException(e);
    }
    return nameVector;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy