You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -73,6 +74,35 @@ Make sure you have these settings in Ionide for FSharp
73
74
```
74
75
Which instructs Ionide to load the analyzers from the directory of the analyzers into which `NpgsqlFSharpAnalyzer` was installed.
75
76
77
+
# Using CLI with Ubik
78
+
79
+
### 1 - Configure the connection string to your development database
80
+
The analyzer requires a connection string that points to the database you are developing against. You can configure this connection string by either creating a file called `NPGSQL_FSHARP` (without extension) somewhere next to your F# project or preferably in the root of your workspace. This file should contain that connection string and nothing else. An example of the contents of such file:
> Remember to add an entry in your .gitingore file to make sure you don't commit the connection string to your source version control system.
85
+
86
+
Another way to configure the connection string is by setting the value of an environment variable named `NPGSQL_FSHARP` that contains the connection string.
87
+
88
+
The analyzer will try to locate and read the file first, then falls back to using the environment variable.
89
+
90
+
### 2 - Install Ubik as a dotnet CLI tool
91
+
```
92
+
dotnet tool install ubik --global
93
+
```
94
+
### 3 - Run Ubik in the directory of the project you want to analyze
95
+
```bash
96
+
cd ./path/to/project
97
+
ubik
98
+
99
+
ubik ./path/to/Project.fsproj
100
+
101
+
ubik ./File1.fs ./AnotherFile.fs
102
+
103
+
ubik --version
104
+
```
105
+
76
106
### Writing Long Multi-line Queries
77
107
78
108
When it is not convenient to write a query inline like this:
<Descriptionxml:space="preserve">F# Analyzer for embedded SQL syntax analysis, type-checking for parameters and result sets and nullable column detection when writing queries using Npgsql.FSharp.</Description>
0 commit comments