Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -491,3 +491,12 @@ Lql/LqlWebsite-Eleventy/_site/

Lql/lql-lsp-rust/target/
*.vsix
Reporting/Nimblesite.Reporting.React/wwwroot/js/Nimblesite.Reporting.React.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/Nimblesite.Reporting.React.meta.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/Nimblesite.Reporting.React.min.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/Nimblesite.Reporting.React.meta.min.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/h5.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/h5.meta.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/h5.min.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/h5.meta.min.js
Reporting/Nimblesite.Reporting.React/wwwroot/js/index.html
3 changes: 2 additions & 1 deletion CodeAnalysis.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<!-- IDE Analyzers = IDE0042 etc-->
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.CodeStyle" RuleNamespace="Microsoft.CodeAnalysis.CSharp.CodeStyle">
<!-- Remove unused parameter -->
<Rule Id="EXHAUSTION001" Action="Error" />
<Rule Id="IDE0290" Action="None" />
<Rule Id="CA1031" Action="None" />
<Rule Id="CA1016" Action="None" />
Expand All @@ -21,6 +20,8 @@
<!-- Mark assemblies with assembly version -->
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1848" Action="None" />

<Rule Id="EXHAUSTION001" Action="Error" />
<Rule Id="MSB3243" Action="Error" />
<Rule Id="NU1603" Action="Error" />
<Rule Id="IDE0037" Action="Error" />
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<!-- IDE errors -->
<WarningsAsErrors>$(WarningsAsErrors);IDE0001;IDE0042;IDE0051;IDE0052;IDE0056;IDE0060;IDE0022;IDE0002;IDE0130;IDE0060;IDE0002</WarningsAsErrors>
<!-- Performance critical rules as errors -->
<WarningsAsErrors>$(WarningsAsErrors);CA1805;CA1806;CA1810;CA1812;CA1813;CA1814;CA1815;CA1816;CA1819;CA1820;CA1821;CA1822;CA1823;CA1824;CA1825;CA1826;CA1827;CA1828;CA1829;CA1830;CA1831;CA1832;CA1833;CA1834;CA1835;CA1836;CA1837;CA1838;CA1839;CA1840;CA1841;CA1842;CA1843;CA1844;CA1845;CA1846;CA1847;CA1849;CA1850;CA1851;CA1852;CA1853;CA1854;CA1855;CA1856;CA1857;CA1858;CA1859;CA1860;CA1861;CA1862;CA1863;CA1864;CA1865;CA1866;CA1867;CA1868;CA1869;CA1870</WarningsAsErrors>
<WarningsAsErrors>$(WarningsAsErrors);CA1805;CA1806;CA1810;CA1812;CA1813;CA1814;CA1815;CA1816;CA1819;CA1820;CA1821;CA1822;CA1823;CA1824;CA1825;CA1826;CA1827;CA1828;CA1829;CA1830;CA1831;CA1832;CA1833;CA1834;CA1835;CA1836;CA1837;CA1838;CA1839;CA1840;CA1841;CA1842;CA1843;CA1844;CA1845;CA1846;CA1847;CA1849;CA1850;CA1851;CA1852;CA1853;CA1854;CA1855;CA1856;CA1857;CA1858;CA1859;CA1860;CA1861;CA1862;CA1863;CA1864;CA1865;CA1866;CA1867;CA1868;CA1869;CA1870;FS3261</WarningsAsErrors>
<!-- Security rules as errors -->
<WarningsAsErrors>$(WarningsAsErrors);CA2100;CA2101;CA2102;CA2103;CA2104;CA2105;CA2106;CA2107;CA2108;CA2109;CA2110;CA2111;CA2112;CA2113;CA2114;CA2115;CA2116;CA2117;CA2118;CA2119;CA2120;CA2121;CA2122;CA2123;CA2124;CA2125;CA2126;CA2127;CA2128;CA2129;CA2130;CA2131;CA2132;CA2133;CA2134;CA2135;CA2136;CA2137;CA2138;CA2139;CA2140;CA2141;CA2142;CA2143;CA2144;CA2145;CA2146;CA2147;CA2148;CA2149;CA2150;CA2151;CA2152;CA2153;CA2154;CA2155;CA2156;CA2157;CA2158;CA2159;CA2160</WarningsAsErrors>
<!-- Design rules as errors -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ module TestFixtures =
use reader = cmd.ExecuteReader()
let results = ResizeArray<Map<string, obj>>()
while reader.Read() do
let row =
let row : Map<string, obj> =
[| for i in 0 .. reader.FieldCount - 1 ->
let name = reader.GetName(i)
let value = if reader.IsDBNull(i) then box DBNull.Value else reader.GetValue(i)
let name : string = reader.GetName(i) |> string
let value : obj =
if reader.IsDBNull(i) then
DBNull.Value :> obj
else
reader.GetValue(i) |> Unchecked.nonNull
(name, value) |]
|> Map.ofArray
results.Add(row)
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ coverage:
@echo "==> Coverage report..."
$(MAKE) _coverage

## vsix: Build Rust LSP (release), compile & package the VS Code extension (.vsix), and install it
vsix:
@echo "==> Building and packaging VSIX..."
bash Lql/lql-lsp-rust/build-vsix.sh

## setup: Post-create dev environment setup (used by devcontainer)
setup:
@echo "==> Setting up development environment..."
Expand Down Expand Up @@ -375,3 +380,4 @@ help:
@echo " ci - lint + test + build (full CI)"
@echo " coverage - Generate and open HTML coverage report"
@echo " setup - Post-create dev environment setup"
@echo " vsix - Build LSP + compile & package VS Code extension (.vsix)"
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
namespace Nimblesite.DataProvider.Migration.Core;

/// <summary>
/// Static helper for DDL generation delegates.
/// Each database provider implements these as static methods.
/// </summary>
public static class DdlGenerator
{
/// <summary>
/// Converts a schema operation to platform-specific DDL SQL.
/// </summary>
/// <param name="operation">The operation to convert</param>
/// <param name="generateDdl">Platform-specific DDL generator function</param>
/// <returns>DDL SQL string</returns>
public static string Generate(
SchemaOperation operation,
Func<SchemaOperation, string> generateDdl
) => generateDdl(operation);

/// <summary>
/// Generates DDL for all operations.
/// </summary>
public static IReadOnlyList<string> GenerateAll(
IReadOnlyList<SchemaOperation> operations,
Func<SchemaOperation, string> generateDdl
) => operations.Select(generateDdl).ToList().AsReadOnly();
}

/// <summary>
/// Migration runner for executing schema operations.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ See the [installation guide](./Website/src/docs/installation.md) for the full pa

## Quick Example

![alt text](lql.png)

Write an LQL query in `GetActiveCustomers.lql`:

```
Expand Down
Loading
Loading