ppx_rapper
ppx_rapper copied to clipboard
SQL Syntax Error when input variable used as array length
The following code:
let create_countries =
let country_alias_length = 3 in
[%rapper
execute
{sql|
CREATE TABLE countries(
id int PRIMARY KEY,
alias char( %int{country_alias_length} ),
name char(20),
time_created timestamp,
UNIQUE(alias)
)
|sql}
]
Produces the following error message:
Error in ppx_rapper: Syntax error in SQL: 'syntax error at or near "?"'