Skip to content

Conversation

@ryanrasti
Copy link
Owner

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes CI issues by replacing the pg dependency with a local implementation of escapeLiteral, updates the schema definition format in examples, and adds a CI badge to the README.

  • Replaces external pg import with local escape-literal implementation to avoid dependency issues
  • Updates schema examples to use explicit {type, required} object format
  • Adds CI status badge to README

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/expression.ts Updates import to use local ./escape-literal instead of pg package
src/escape-literal.ts Adds new local implementation of escapeLiteral function copied from node-postgres
examples/schema.ts Updates table schema definitions to use explicit {type, required} object format
README.md Adds CI workflow badge to documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

escaped += "'";

if (hasBackslash === true) {
escaped = " E" + escaped;
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The escaped string should be prefixed with "E" (without a leading space). The current implementation adds " E" with a space, which would result in invalid SQL syntax like " E'...'". This should be "E" + escaped instead of " E" + escaped.

Suggested change
escaped = " E" + escaped;
escaped = "E" + escaped;

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,34 @@
// Taken from:https://github.com/brianc/node-postgres/blob/8d493f3b5531bfe226d40c1d64d1d020ee33fd6f/packages/pg/lib/utils.js#L175
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after colon in the URL comment. Should be "Taken from: https://..." instead of "Taken from:https://..."

Suggested change
// Taken from:https://github.com/brianc/node-postgres/blob/8d493f3b5531bfe226d40c1d64d1d020ee33fd6f/packages/pg/lib/utils.js#L175
// Taken from: https://github.com/brianc/node-postgres/blob/8d493f3b5531bfe226d40c1d64d1d020ee33fd6f/packages/pg/lib/utils.js#L175

Copilot uses AI. Check for mistakes.
@ryanrasti ryanrasti merged commit 2bab24b into main Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants