question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide ability to override quoter on RunnerContext

See original GitHub issue

First of all, thanks for this awesome tool, it changed the way i’m thinking about database versioning, and i’m using in it my business app platform, Serenity.

Considering a table created with this simple migration:

Create.Table("Users")

If you run this migration in SQL server, it quotes with brackets, and in PostgreSQL it uses double quotes, nothing seems wrong so far.

But later, when you wanted to execute a very simple query:

SELECT * FROM Users

This works in SQL Server, but not PostgreSQL.

SELECT * FROM users

Again this works in SQL Server, but not PostgreSQL.

In PostgreSQL, if you put double quotes in tablename, while creating a table, not only it becomes case sensitive, you must also use double quotes while querying it, even if you use the exact same case. I don’t want to question their reasons. They probably had a very bright idea while designing this.

But i didn’t put double quotes myself, PostgreSQLQuoter did this, and i have no option to turn it off.

I just want to be able to write database-independent SQL queries (with dapper etc) at least for very simple ones, without having to quote everything.

I don’t ask you to change defaults, maybe some people are depending on this feature, but please provide a way to override default quoter of the generator. I think it should be a parameter on RunnerContext. I’ll subclass quoter, and assign it before running migrations.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
a-jamil-idwarecommented, Oct 27, 2020

@jzabroski I will create a PR for the above mentioned feature request.

1reaction
a-jamil-idwarecommented, Oct 27, 2020

I understand quoting does force case sensitivity, I would have created a PR for that but I am extremely busy and I have temporarily used character escape. I think there should be a proper way for that and I have added a feature request for this Enable Quoted Identifier functionality for Oracle

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are Contexts always able to be evaluated in a runner script?
So basically my question is, is it always OK to resolve environment (or other context) variables at the “workflow level” in a 'run' ......
Read more >
Configure Prettier to avoid replacing quotes
Background. I have tried several keywords but was not able to find a solution to disable prettier's quotes modification.
Read more >
Regex for Quoted String with escapable quotes
This is essentially an attempt to match any string of characters up to a closing quote, considering that we should allow people to...
Read more >
Quoting in HTML: Quotations, Citations, and Blockquotes
Both <q> and blockquotes can use a citation ( cite ) attribute. This attribute holds a URL that provides context and/or a reference...
Read more >
Advanced configuration
Advanced configuration. You can change the behavior of GitLab Runner and of individual registered runners. To do this, you modify a file called...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found