Skip to content

Commit

Permalink
Added registerTypes as alias for registerType
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 26, 2024
1 parent 71396d3 commit b66ad41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pg-promise/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { registerType, toSql } = require('../pg');
const { registerType, registerTypes, toSql } = require('../pg');

module.exports = {registerType, toSql};
module.exports = {registerType, registerTypes, toSql};
6 changes: 4 additions & 2 deletions src/pg/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const utils = require('../utils');

async function registerType(client) {
async function registerTypes(client) {
const result = await client.query('SELECT typname, oid FROM pg_type WHERE typname IN ($1, $2, $3)', ['vector', 'halfvec', 'sparsevec']);
const rows = result.rows;

Expand Down Expand Up @@ -36,4 +36,6 @@ function toSql(value) {
return utils.toSql(value);
}

module.exports = {registerType, toSql};
const registerType = registerTypes;

module.exports = {registerType, registerTypes, toSql};

0 comments on commit b66ad41

Please sign in to comment.