bunql 1.0.1-dev.3 → 1.0.1-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/schema.ts +5 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunql",
3
- "version": "1.0.1-dev.3",
3
+ "version": "1.0.1-dev.4",
4
4
  "description": "A fluent SQL query builder for Bun with transaction support",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
package/src/schema.ts CHANGED
@@ -655,7 +655,7 @@ export class Schema {
655
655
  query = `
656
656
  SELECT table_name
657
657
  FROM information_schema.tables
658
- WHERE table_schema = 'public' AND table_name = $1
658
+ WHERE table_schema = 'public' AND table_name = ?
659
659
  `;
660
660
  break;
661
661
  case 'mysql':
@@ -703,11 +703,12 @@ export class Schema {
703
703
  JOIN information_schema.key_column_usage ku
704
704
  ON tc.constraint_name = ku.constraint_name
705
705
  WHERE tc.constraint_type = 'PRIMARY KEY'
706
- AND tc.table_name = $1
706
+ AND tc.table_name = ?
707
707
  ) pk ON c.column_name = pk.column_name
708
- WHERE c.table_name = $1
708
+ WHERE c.table_name = ?
709
709
  ORDER BY c.ordinal_position
710
710
  `;
711
+ params = [tableName, tableName];
711
712
  break;
712
713
  case 'mysql':
713
714
  query = `
@@ -876,7 +877,7 @@ export class Schema {
876
877
  JOIN information_schema.referential_constraints rc
877
878
  ON tc.constraint_name = rc.constraint_name
878
879
  WHERE tc.constraint_type = 'FOREIGN KEY'
879
- AND tc.table_name = $1
880
+ AND tc.table_name = ?
880
881
  `;
881
882
  break;
882
883
  case 'mysql':