Skip to content

Commit

Permalink
fix(postgres): postgres incorrectly use escapeId from sql-utils (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seidko committed Feb 21, 2024
1 parent 5833775 commit 35ff516
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/postgres/src/builder.ts
@@ -1,9 +1,13 @@
import { Builder, escapeId, isBracketed } from '@minatojs/sql-utils'
import { Builder, isBracketed } from '@minatojs/sql-utils'
import { Dict, isNullable, Time } from 'cosmokit'
import { Field, isEvalExpr, Model, randomId, Selection } from 'minato'

const timeRegex = /(\d+):(\d+):(\d+)/

export function escapeId(value: string) {
return '"' + value.replace(/"/g, '""') + '"'
}

export function formatTime(time: Date) {
const year = time.getFullYear().toString()
const month = Time.toDigits(time.getMonth() + 1)
Expand Down

0 comments on commit 35ff516

Please sign in to comment.