Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 4852176

Browse files
committed
Allow bind variable in ATTACH and DETACH.
1 parent 520618a commit 4852176

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/grammar.pegjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ stmt_sqlite
960960
/ stmt_pragma
961961

962962
stmt_attach "ATTACH Statement"
963-
= a:( ATTACH ) o b:( DATABASE o )? e:( expression ) o AS o n:( id_database / literal_null ) o
963+
= a:( ATTACH ) o b:( DATABASE o )? e:( expression ) o AS o n:( attach_arg ) o
964964
{
965965
return {
966966
'type': 'statement',
@@ -970,8 +970,11 @@ stmt_attach "ATTACH Statement"
970970
};
971971
}
972972

973+
attach_arg
974+
= id_database / literal_null / bind_parameter
975+
973976
stmt_detach "DETACH Statement"
974-
= d:( DETACH ) o b:( DATABASE o )? n:( id_database / literal_null ) o
977+
= d:( DETACH ) o b:( DATABASE o )? n:( attach_arg ) o
975978
{
976979
return {
977980
'type': 'statement',

0 commit comments

Comments
 (0)