Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for common SQL idioms #1154

Closed
JakeWharton opened this issue Jan 15, 2019 · 1 comment
Closed

Templates for common SQL idioms #1154

JakeWharton opened this issue Jan 15, 2019 · 1 comment

Comments

@JakeWharton
Copy link
Member

Similar interaction to what you get with fori in code. Maybe you do joinl and get

LEFT JOIN [<source>] ON [<clause>]

with the cursor selecting <source> and then pressing tab goes to <clause>.

@JakeWharton
Copy link
Member Author

pk becomes PRIMARY KEY if inside a column definition. Otherwise it becomes PRIMARY KEY ([columns]).

fk becomes REFERENCES [table]([column]) if inside a column definition. Otherwise it becomes FOREIGN KEY ([column]) REFERENCES [table]([column]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants