A Visual Studio Code extension which extends the SQLTools extension to work with SingleStore.
- Connect to a SingleStoreDB instance
- Manage connections in SQLTools Database Explorer
- View tables, views, columns, functions, procedures
- Autocomplete SQL keywords, table and view names, column names, SingleStore built-in functions
- Run SQL queries
- Export SQL query results in CSV and JSON data formats
Launch VS Code Quick Open (
Ctrl+P), paste the following command, and press Enter.
ext install singlestore.sqltools-singlestore-driver
Alternatively, you can install this extension in the Visual Studio Code IDE from the Extensions tab. Press
Ctrl+Shift+X by searching for
The following examples perform different tasks using the driver.
Refer to SQLTools documentation for more information.
Create a Connection
Show records default limit parameter specifies the maximum number of rows that are shown in the result.
View tables and views
Run a SQL query
View and Edit Functions and Procedures
Note: When creating a function or a procedure, you must change the delimiter to ensure that the function or procedure definition is correctly passed to the server as a single statement. The default delimiter is a semicolon (;). A problem arises when creating functions or procedures because they use semicolons as statement delimiters within the function body. Therefore, you must change the delimiter setting before creating your function or procedure, and then set it back to a semicolon after the alternate delimiter is no longer needed. Therefore, you must change the delimiter to something else (for example
//) before creating your function or procedure, and then revert it to a semicolon (
DELIMITER commands must be on independent lines.
Here's an example:
CREATE OR REPLACE PROCEDURE courses_sp (course_code TEXT, section_number INT, number_students INT) AS
code TEXT = UCASE(course_code);
num_students INT = number_students + 1;
INSERT INTO courses VALUES (code, section_number, num_students);
Support and Feedback
If you have any questions, want to report a bug, or have a feature request please open an issue.
Setup development environment
- Clone this repository, and open it in Visual Studio Code.
npm install to install all dependencies.
npm run watch.
- Open the
extension.ts file, and press F5. This opens a new Visual Studio Code window with a development version of the driver extension loaded.