running none SQL commands in SQLite?


I am evaluating DataGrip right now to use with SQLite.  There are times the program needs to run raw non SQL commands, such as PRAGMA <...> or maybe .schema [tablename], I would like to see the output the database will provide, is there a way to execute these commands in DataGrid?

Comment actions Permalink


You just need to execute your queries in Console:

Comment actions Permalink

So what I am doing is entering the command in this window and then I click on the green arrow.  Then it gives me the error "Nothing to run", what am I doing wrong?

Comment actions Permalink

IDE supports PRAGMA commands, but do not support sqlite3 (dot-commands).

As a workaround you can use sqlite3 CLI in Terminal:

Comment actions Permalink

I was just about to ask the same, though I was trying to do it from IntelliJ Ultimate.

The syntax highlighting is nicely coloring the dot-commands, so I was naturally expecting them to work too.

I guess the reason why such a feature is not supported is because most other SQL databases are accessed through the network.

In case of the dot-commands, they might refer to files with a relative path, so to resolve those, there has to be a current directory defined for the db connection / console. It would require quite a lot of work to insert this concept into the current project data model and UI, only for the sake of SQLite. :/

What would be really great instead, if there would be some more unified interface to the REPLs of the various programming languages, so we can edit longer expression from the comfort of the IDE's editor and send them over to the REPLs.


Please sign in to leave a comment.