Git Product home page Git Product logo

Comments (5)

rgbkrk avatar rgbkrk commented on May 21, 2024

First I've heard. It's all yours!

The primary issue you're going to run into is what SQL shell the user is working with (psql, sqlite3). Not sure it can be inferred.

from atom-script.

cboebel avatar cboebel commented on May 21, 2024

OK. I'll take a look. I figured there might be a 'what-sql' issue, but that could be addressed in a configuration file somewhere (as we'd also need to store database name, username, etc).

from atom-script.

MrTrustworthy avatar MrTrustworthy commented on May 21, 2024

Piggybacking on this thread since it seems to be main/original SQL discussion:

It is currently possible to run a file with SQL commands by creating a "Script: Run Options" profile containing (PostgreSQL as example, assuming passwords are set accordingly):

Command: psql
Command Arguments: -h server -U user -d database -f {FILE_ACTIVE}

While a better way to input the login data would be great, this current state is sufficient for most use cases (at least for me).

HOWEVER: Since atom-script does not support SQL, running with this "Run Option" fails due to "Command not configured for SQL". The workaround is to set the language of the current buffer (CTRL+SHIFT+L on Windows) to a supported language (for example C). This, in turn, ruins syntax highlighting, toggle-comment etc. and consequently forces me to switch between SQL, C and back to SQL quite often.

Enabling support for SQL files and maybe adding some helpful information in the readme/when running SQL files would go a long way to make atom-script useable for SQL in general.

from atom-script.

rgbkrk avatar rgbkrk commented on May 21, 2024

@MrTrustworthy thanks for outlining a solution. Want to create a dummy runner that runs e.g. echo "SQL requires setting Script: Run Options directly"?

from atom-script.

MrTrustworthy avatar MrTrustworthy commented on May 21, 2024

Sure! I'll send a pull request once I'm done.

from atom-script.

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.