GithubHelp home page GithubHelp logo

Comments (4)

gregsadetsky avatar gregsadetsky commented on May 29, 2024

I used git bisect and found the commit that introduced the problem: it's this one.

The select a1.col_name syntax works in the commit right before that.

Thanks!

from sublime_rainbow_csv.

mechatroner avatar mechatroner commented on May 29, 2024

Hi Greg,
Sorry about this, At first I thought that this is a bug, but it is actually a feature and I should have added a meaningful error message before introducing this breaking change.
But it should work if you add with (header) at the end of the query, the syntax is similar to with (nolock) modifier in MS SQL server - and this would automatically skip the first record e.g. you can now use select int(a.col_name) syntax without adding where NR > 1. Also, this always carries the header record to the output e.g. Select top 10 * order by a1 with (header). And you can also set rbql_with_headers setting to true if the majority of the tables you are dealing with have headers, and if one or two don't have them - you can override it with with (noheader). It would be cool if Sublime Text would allow extensions to create a checkbox to control this with GUI on a per-query basis, but there is no such option right now, unfortunately, so the only 2 ways to control this are either the setting or the query modifier.
Please let me know if it didn't work! Thanks!

from sublime_rainbow_csv.

gregsadetsky avatar gregsadetsky commented on May 29, 2024

Ah, that makes perfect sense, thank you! with (header) worked, and the rbql_with_headers setting is really useful. I just enabled it and yes, select a.col_name works! That's really great.

Just out of curiosity, is there any downside to having rbql_with_headers always on?

(I'll also close the issue since there isn't a bug in the package)

from sublime_rainbow_csv.

mechatroner avatar mechatroner commented on May 29, 2024

Glad it worked!

Just out of curiosity, is there any downside to having rbql_with_headers always on?

I think the only downside is that it is possible to forget that rbql_with_headers is on, run a query using a1, a2 etc, and inadvertently skip the first row.

from sublime_rainbow_csv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.