Skip to content

Commit

Permalink
https://github.com/manifold-systems/manifold/issues/558
Browse files Browse the repository at this point in the history
- add minor ddl test for keyword use
- escape table qualifier for join
  • Loading branch information
rsmckinney committed Mar 24, 2024
1 parent 44f4e8c commit 907e374
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ create table all_types (-- SQL Type JDBC

);

--
-- Test table having SQL keywords for table name and column names
--
create table "select" (
"order" IDENTITY NOT NULL PRIMARY KEY,
"where" VARCHAR(12) NOT NULL
);

--
-- Table structure for table `actor`
--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ private String makeJoinWhere( SchemaColumn fkToMe )
{
StringBuilder sb = new StringBuilder();
SchemaColumn refCol = fkToMe.getForeignKey();
sb.append( fkToMe.getOwner().getName() ).append( '.' ).append( fkToMe.getEscapedName() ).append( " = ?" );
sb.append( fkToMe.getOwner().getEscapedName() ).append( '.' ).append( fkToMe.getEscapedName() ).append( " = ?" );
return sb.toString();
}

Expand Down

0 comments on commit 907e374

Please sign in to comment.