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
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- **No raw SQL inserts/updates** - Use generated extensions
- **Use DataProvider Migrations to spin up DBs** - ⛔️ SQL for creating db schema = ILLEGAL (schema.sql = ILLEGAL). Use the Migration.CLI with YAML. This is the ONLY valid tool to migrate dbs unless the app itself spins up the migrations in code.
- **NO CLASSES** - Records + static methods (FP style)
- **PRIVATE/INTERNAL BY DEFAULT** - Don't expose types/members that users don't need
- **Copious ILogger** - Especially sync projects
- **NO INTERFACES** - Use `Action<T>`/`Func<T>`
- **Expressions over assignments**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace DataProvider.SQLite.CodeGeneration;
/// SQLite-specific database effects implementation
/// </summary>
[ExcludeFromCodeCoverage]
public class SqliteDatabaseEffects : IDatabaseEffects
internal sealed class SqliteDatabaseEffects : IDatabaseEffects
{
/// <summary>
/// Gets column metadata by executing the SQL query against the SQLite database.
Expand Down
2 changes: 1 addition & 1 deletion DataProvider/DataProvider.SQLite/Parsing/SQLiteLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace DataProvider.SQLite.Parsing {

[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.CLSCompliant(false)]
public partial class SQLiteLexer : Lexer {
internal partial class SQLiteLexer : Lexer {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
Expand Down
228 changes: 114 additions & 114 deletions DataProvider/DataProvider.SQLite/Parsing/SQLiteParser.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace DataProvider.SQLite.Parsing {
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.Diagnostics.DebuggerNonUserCode]
[System.CLSCompliant(false)]
public partial class SQLiteParserBaseListener : ISQLiteParserListener {
internal partial class SQLiteParserBaseListener : ISQLiteParserListener {
/// <summary>
/// Enter a parse tree produced by <see cref="SQLiteParser.parse"/>.
/// <para>The default implementation does nothing.</para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace DataProvider.SQLite.Parsing {
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.Diagnostics.DebuggerNonUserCode]
[System.CLSCompliant(false)]
public partial class SQLiteParserBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, ISQLiteParserVisitor<Result> {
internal partial class SQLiteParserBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, ISQLiteParserVisitor<Result> {
/// <summary>
/// Visit a parse tree produced by <see cref="SQLiteParser.parse"/>.
/// <para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace DataProvider.SQLite.Parsing {
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.CLSCompliant(false)]
public interface ISQLiteParserListener : IParseTreeListener {
internal interface ISQLiteParserListener : IParseTreeListener {
/// <summary>
/// Enter a parse tree produced by <see cref="SQLiteParser.parse"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace DataProvider.SQLite.Parsing {
/// <typeparam name="Result">The return type of the visit operation.</typeparam>
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.CLSCompliant(false)]
public interface ISQLiteParserVisitor<Result> : IParseTreeVisitor<Result> {
internal interface ISQLiteParserVisitor<Result> : IParseTreeVisitor<Result> {
/// <summary>
/// Visit a parse tree produced by <see cref="SQLiteParser.parse"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace DataProvider.SQLite.Parsing;
/// Parameter extractor for SQLite using ANTLR parse tree
/// </summary>
[ExcludeFromCodeCoverage]
public sealed class SqliteParameterExtractor
internal sealed class SqliteParameterExtractor
{
/// <summary>
/// Extracts parameter names from the provided ANTLR <see cref="IParseTree"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace DataProvider.SQLite.Parsing;
/// Listener to determine SQLite query type from parse tree
/// </summary>
[ExcludeFromCodeCoverage]
public sealed class SqliteQueryTypeListener : SQLiteParserBaseListener
internal sealed class SqliteQueryTypeListener : SQLiteParserBaseListener
{
/// <summary>
/// Gets the detected query type (e.g. SELECT, INSERT, UPDATE, DELETE).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace DataProvider.SqlServer.SchemaInspection;
/// <summary>
/// SQL Server implementation of schema inspection
/// </summary>
public sealed class SqlServerSchemaInspector : ISchemaInspector
internal sealed class SqlServerSchemaInspector : ISchemaInspector
{
private readonly string _connectionString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace DataProvider.SqlServer.SqlParsing;
/// <summary>
/// SQL parser implementation using SqlParserCS library
/// </summary>
public sealed class SqlParserCsImplementation : ISqlParser
internal sealed class SqlParserCsImplementation : ISqlParser
{
private readonly SqlQueryParser _parser = new();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DataProvider.SqlServer;
/// <summary>
/// SQL Server specific code generator static methods
/// </summary>
public static class SqlServerCodeGenerator
internal static class SqlServerCodeGenerator
{
/// <summary>
/// Generate C# source code for a SQL file (fallback method)
Expand Down
2 changes: 1 addition & 1 deletion DataProvider/DataProvider.SqlServer/SqlServerParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace DataProvider.SqlServer;
/// <summary>
/// SQL Server specific parser implementation using SqlParserCS
/// </summary>
public sealed class SqlServerParser : ISqlParser
internal sealed class SqlServerParser : ISqlParser
{
private readonly SqlParserCsImplementation _parser = new();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace DataProvider.CodeGeneration;
/// <summary>
/// Pure transformation functions for generating grouped query code
/// </summary>
public static class GroupingTransformations
internal static class GroupingTransformations
{
/// <summary>
/// Generates the grouping method that transforms flat results into parent-child structure
Expand Down
2 changes: 1 addition & 1 deletion DataProvider/DataProvider/ICodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace DataProvider;
/// <summary>
/// Type aliases for code generation functions
/// </summary>
public static class CodeGenerators
internal static class CodeGenerators
{
/// <summary>
/// Function type for generating C# source code from SQL metadata
Expand Down
2 changes: 1 addition & 1 deletion DataProvider/DataProvider/SchemaTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public sealed record SqlQueryMetadata
/// <summary>
/// Abstraction for inspecting database schema
/// </summary>
public interface ISchemaInspector
internal interface ISchemaInspector
{
/// <summary>
/// Gets table information including columns and their metadata
Expand Down
8 changes: 0 additions & 8 deletions DataProvider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ YourProject → DataProvider → (build target) DataProvider.SQLite.Cli → Data
<ProjectReference Include="DataProvider.csproj" /> <!-- REMOVE THIS -->
```

### Forbidden Patterns

- **NO raw SQL DDL files** - Use Migration.Cli with YAML
- **NO individual BuildDb projects** - Use Migration.Cli (single tool)
- **NO `schema.sql` files** - YAML schemas only
- **NO code generation before schema creation** - Migration MUST run first
- **NO C# schema export at build time** - Export once, commit YAML to git

## Configuration

Create a `DataProvider.json` file in your project root:
Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/LqlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Lql;
/// <summary>
/// Extension methods for working with nodes and steps.
/// </summary>
public static class LqlExtensions
internal static class LqlExtensions
{
/// <summary>
/// Wraps a node in an identity step.
Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/Parsing/LqlBaseListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Lql.Parsing {
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.Diagnostics.DebuggerNonUserCode]
[System.CLSCompliant(false)]
public partial class LqlBaseListener : ILqlListener {
internal partial class LqlBaseListener : ILqlListener {
/// <summary>
/// Enter a parse tree produced by <see cref="LqlParser.program"/>.
/// <para>The default implementation does nothing.</para>
Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/Parsing/LqlBaseVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Lql.Parsing {
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.Diagnostics.DebuggerNonUserCode]
[System.CLSCompliant(false)]
public partial class LqlBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, ILqlVisitor<Result> {
internal partial class LqlBaseVisitor<Result> : AbstractParseTreeVisitor<Result>, ILqlVisitor<Result> {
/// <summary>
/// Visit a parse tree produced by <see cref="LqlParser.program"/>.
/// <para>
Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/Parsing/LqlCodeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Lql.Parsing;
/// <summary>
/// Utility class for parsing LQL code.
/// </summary>
public static class LqlCodeParser
internal static class LqlCodeParser
{
private static readonly char[] SplitCharacters = [' ', '\t', '|', '>', '(', ')', ',', '='];

Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/Parsing/LqlLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Lql.Parsing {

[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.CLSCompliant(false)]
public partial class LqlLexer : Lexer {
internal partial class LqlLexer : Lexer {
protected static DFA[] decisionToDFA;
protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
public const int
Expand Down
2 changes: 1 addition & 1 deletion Lql/Lql/Parsing/LqlListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Lql.Parsing {
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
[System.CLSCompliant(false)]
public interface ILqlListener : IParseTreeListener {
internal interface ILqlListener : IParseTreeListener {
/// <summary>
/// Enter a parse tree produced by <see cref="LqlParser.program"/>.
/// </summary>
Expand Down
Loading
Loading