cloudspannerecosystem / memefish

memefish is the foundation to analyze Spanner SQL
https://cloudspannerecosystem.dev/memefish/
MIT License
76 stars 19 forks source link

Add support for foreign key to CREATE TABLE. #25

Closed matope closed 4 years ago

matope commented 4 years ago

Hi, I'm using your awesome library through handy-spanner.

Recently, Cloud Spanner supported the Foreign key feature and I'd like to use it on handy-spanner. This PR adds support FKs like below to CREATE TABLE in memefish. Could you take a look at this PR?

FOREIGN KEY (k1) REFERENCES T2 (t2key1)
CONSTRAINT foreignkey_name FOREIGN KEY (k1, k2) REFERENCES t2 (t2key1, t2key2)

ref:

makenowjust commented 4 years ago

Thank you!