Closed nktks closed 3 years ago
After getting this PR merged, a ParseDDLs
result will contain nil
only when the source has a trailing comment following to the last semicolon. Despite this behavior, an alone semicolon will be rejected by the parser. It seems natural to support an empty statement generally.
Another question I have is "why does it need to treat ParseDDL
as special?" It makes more sense to me that ParseQuery
and ParseDML
do so.
Thanks for your review.
I'll try to use ParseDDLs
for my usecase.
I can parse my usecase by using ParseDDLs
.
So I close this.
Another question I have is "why does it need to treat ParseDDL as special?"
Sorry, there is no reason... I just want to fix my case.
yo
using strings.Split(schema, ";")
for parse multiple ddls in strings.
So I'll change yo code.
Thanks.
Hi!
I use https://github.com/cloudspannerecosystem/yo , and yo use memefish.
I want parse DDL such as
And I changed
parseDDL
to return nil if first token kind istoken.TokenEOF
. Please review this change.Thanks!