Files
sqlpage--sqlpage/mssql/setup.sql
T
Ophir LOJKINE 563bc87959 delegate statement preparation to sqlx (#135)
* delegate statement preparation to sqlx

The logic of preparing statements and caching them for later reuse is now entirely delegated to the sql driver library (sqlx).
This simplifies the code and logic inside sqlpage itself.

 More importantly, statements are now prepared in a streaming fashion when a file is first loaded, instead of all at once, which allows referencing a temporary table created at the start of a file in a later statement in the same file.

 fixes #100

* remove temporary table usage

mssql does not have "create temp table"

* mssql permissions fix
2023-11-19 01:32:04 +01:00

16 lines
286 B
Transact-SQL

IF DB_ID('sqlpage') IS NULL
BEGIN
CREATE DATABASE sqlpage;
END;
GO
USE sqlpage;
GO
CREATE LOGIN root WITH PASSWORD = 'Password123!';
CREATE USER root FOR LOGIN root;
GO
GRANT CREATE TABLE TO root;
GRANT ALTER, DELETE, INSERT, SELECT, UPDATE ON SCHEMA::dbo TO root;
GO