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

Feature Request: Option for Capitalized Keywords (Ex: select -> SELECT, from -> FROM, #2

Open
cliffordfajardo opened this issue Aug 15, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@cliffordfajardo
Copy link
Contributor

cliffordfajardo commented Aug 15, 2019

What is the suggestion?

  • As a user of this library, I think a great enhancement would be to support usage of capitalized SQL keywords

Why?

SQL & Javascript snippet examples below:

Javascript Example

import { query } from 'sqliterally';
/************ 1. Non capitalized *************/
let q = query
	.select` id, username`.from`Users`.where`name = 'Anna'`
let q = query
    .select`
      id,
      username`
    .from`
      Users`
	.where`name = 'Anna';

/************ 2. Capitalized *************/
let q = query
	.SELECT` id, username`.FROM`Users`.WHERE`name = 'Anna'`
let q = query
    .SELECT`
      id,
      username`
    .FROM`
      Users`
	.WHERE`name = 'Anna';

Raw SQL Example for putting this into context

1. Non capitalized
select id, username from Users WHERE name = 'Anna'

select
	id,
	username
from
	Users
where name = 'Anna'

-------------------------------------------

2. Capitalized
SELECT id, username FROM Users WHERE name = 'Anna'

SELECT 
	id,
 	username 
FROM
	Users
WHERE name = 'Anna'
@terkelg
Copy link
Owner

terkelg commented Aug 15, 2019

Thank you! I'll see if I can come up with a simple way to do this without adding too much code. Something like this could be done with proxies

@terkelg terkelg added the enhancement New feature or request label Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants