diff --git a/.vscode/launch.json b/.vscode/launch.json index 7a70a65..ef96383 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,9 +10,9 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/Weelink-IT.FluentSQL.Tests/bin/Debug/netcoreapp2.1/Weelink-IT.FluentSQL.Tests.dll", + "program": "${workspaceFolder}/src/FluentSQL.Tests/bin/Debug/netcoreapp2.1/FluentSQL.Tests.dll", "args": [], - "cwd": "${workspaceFolder}/src/Weelink-IT.FluentSQL.Tests", + "cwd": "${workspaceFolder}/src/FluentSQL.Tests", // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window "console": "internalConsole", "stopAtEntry": false diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6b24fcb..88a7b63 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/src/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" }, @@ -17,7 +17,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/src/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" }, @@ -28,7 +28,7 @@ "args": [ "watch", "run", - "${workspaceFolder}/src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/src/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" } diff --git a/FluentSQL.sln b/FluentSQL.sln new file mode 100644 index 0000000..1a902a2 --- /dev/null +++ b/FluentSQL.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentSQL", "src\FluentSQL\FluentSQL.csproj", "{800CCADC-4D2E-46B9-BBCA-615460EC0BE1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentSQL.Tests", "src\FluentSQL.Tests\FluentSQL.Tests.csproj", "{19D00F63-693F-4EFA-AA6C-B106291C9A6F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {800CCADC-4D2E-46B9-BBCA-615460EC0BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {800CCADC-4D2E-46B9-BBCA-615460EC0BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {800CCADC-4D2E-46B9-BBCA-615460EC0BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {800CCADC-4D2E-46B9-BBCA-615460EC0BE1}.Release|Any CPU.Build.0 = Release|Any CPU + {19D00F63-693F-4EFA-AA6C-B106291C9A6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19D00F63-693F-4EFA-AA6C-B106291C9A6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19D00F63-693F-4EFA-AA6C-B106291C9A6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19D00F63-693F-4EFA-AA6C-B106291C9A6F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3D4D5910-FD0C-4E31-8BB4-D618A300A761} + EndGlobalSection +EndGlobal diff --git a/Weelink-IT.FluentSQL.sln.DotSettings b/FluentSQL.sln.DotSettings similarity index 100% rename from Weelink-IT.FluentSQL.sln.DotSettings rename to FluentSQL.sln.DotSettings diff --git a/LICENSE b/LICENSE index d1afdc4..15d4aa4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Weelink-IT +Copyright (c) 2019 FluentSQL Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Weelink-IT.FluentSQL.sln b/Weelink-IT.FluentSQL.sln deleted file mode 100644 index 935a6ea..0000000 --- a/Weelink-IT.FluentSQL.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.572 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Weelink-IT.FluentSQL", "src\Weelink-IT.FluentSQL\Weelink-IT.FluentSQL.csproj", "{608F8140-560F-45DB-8CEB-594AB98CF1CE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Weelink-IT.FluentSQL.Tests", "src\Weelink-IT.FluentSQL.Tests\Weelink-IT.FluentSQL.Tests.csproj", "{0B4D261C-0FFB-47F8-BBB2-E1B6E0076ADF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {608F8140-560F-45DB-8CEB-594AB98CF1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {608F8140-560F-45DB-8CEB-594AB98CF1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {608F8140-560F-45DB-8CEB-594AB98CF1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {608F8140-560F-45DB-8CEB-594AB98CF1CE}.Release|Any CPU.Build.0 = Release|Any CPU - {0B4D261C-0FFB-47F8-BBB2-E1B6E0076ADF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0B4D261C-0FFB-47F8-BBB2-E1B6E0076ADF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0B4D261C-0FFB-47F8-BBB2-E1B6E0076ADF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0B4D261C-0FFB-47F8-BBB2-E1B6E0076ADF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3D4D5910-FD0C-4E31-8BB4-D618A300A761} - EndGlobalSection -EndGlobal diff --git a/docs/api/Weelink-IT.FluentSQL.xml b/docs/api/FluentSQL.xml similarity index 55% rename from docs/api/Weelink-IT.FluentSQL.xml rename to docs/api/FluentSQL.xml index 11da40b..601bfd8 100644 --- a/docs/api/Weelink-IT.FluentSQL.xml +++ b/docs/api/FluentSQL.xml @@ -1,25 +1,25 @@ - Weelink-IT.FluentSQL + FluentSQL - + The result of the compilation of a query. - + Gets the SQL to execute. - + - Compiles a to a query. + Compiles a to a query. - + Compile to an executable query. @@ -27,74 +27,117 @@ The parameters required for executing this query. - The that contains all query parts. + The that contains all query parts. The compilation result. - + Represents the database. - + Construct a new database. - The to use for compiling queries. + The to use for compiling queries. - + + + Compile into a query. + + + The parameters required for executing this query. + + The result type of the query. + The to compile. + A compiled query. + + + + Compile into a query. + + The result type of the query. + The to compile. + A compiled query. + + Represents a SQL Server database. - + Construct a new database targeting SQL Server. - + + + Compiles a to a query for SQL Server. + + + + + Extends for executing queries. + + + + + Execute this query and return the result. + + The . + The query to execute. + Configures the parameters. + The optional transaction. + The result of the query. + + - Compiles a to a query for SQL Server. + Execute this query and return the result. + The . + The query to execute. + The optional transaction. + The result of the query. - + Represents a column. The column type. - + Represents the model in the database. - + - Create a new . + Create a new . The database where this persistence model is located. - + Query this persistence model. The result type of the query. - A new . + A new . - + Any expression of type that can be used in SQL. - The result type of evaluating this . + The result type of evaluating this . - + - + - + Implicitly convert to , so that it can be used in regular .NET constructs @@ -109,79 +152,79 @@ - + - Allows for an equals comparison between a and + Allows for an equals comparison between a and a value of type . - + - Allows for a not equals comparison between a and + Allows for a not equals comparison between a and a value of type . - + - Allows for an greater than comparison between a and + Allows for an greater than comparison between a and a value of type . - + - Allows for an less than comparison between a and + Allows for an less than comparison between a and a value of type . - + - Allows for an greater than or equal comparison between a and + Allows for an greater than or equal comparison between a and a value of type . - + - Allows for an less than or equal comparison between a and + Allows for an less than or equal comparison between a and a value of type . - + - Allows for an equals comparison between two s. + Allows for an equals comparison between two s. - + - Allows for a not equals comparison between two s. + Allows for a not equals comparison between two s. a value of type . - + - Allows for an greater than comparison between two s. + Allows for an greater than comparison between two s. - + - Allows for an less than comparison between two s. + Allows for an less than comparison between two s. - + - Allows for an greater than or equal comparison between two s. + Allows for an greater than or equal comparison between two s. - + - Allows for an less than or equal comparison between two s. + Allows for an less than or equal comparison between two s. - + Represents a table. - + The compiled query to execute. @@ -190,46 +233,32 @@ The parameters required for executing this query. - + - Create a new query that will be executed in . + Create a new query. - The database for this query. - The SQL to execute. + The result of the compilation. - - - Execute this query and return the result. - - The result of the query. - - + The compiled query to execute. The result type. - + - Create a new query that will be executed in . + Create a new query. - The database for this query. - The SQL to execute. - - - - Execute this query and return the result. - - The result of the query. + The result of the compilation. - + Extends . - + - Modify so that the first parameter is . + Modify so that the first parameter is . The other type. @@ -237,20 +266,20 @@ A new Expression<Func<NoParameters, T>>. - + - Extends s. + Extends s. - + Compile into a query. The result type of the query. - The to compile. + The to compile. A compiled query. - + Compile into a query. @@ -258,18 +287,18 @@ The parameters required for executing this query. The result type of the query. - The to compile. + The to compile. A compiled query. - + Compile into a query. The result type of the query. - The to compile. + The to compile. A compiled query. - + Compile into a query. @@ -277,343 +306,343 @@ The parameters required for executing this query. The result type of the query. - The to compile. + The to compile. A compiled query. - + - Averages a . + Averages a . - + Create a new AVERAGE-expression. - The actual that should be averaged. + The actual that should be averaged. - + - Casts a SqlExpression<TFrom> to - SqlExpression<To>. + Casts a SqlExpression<TFrom> to + SqlExpression<To>. - + Create a new CAST-expression. - The that should be casted to . + The that should be casted to . - + - Convert a SqlExpression<TFrom> to - SqlExpression<To>. + Convert a SqlExpression<TFrom> to + SqlExpression<To>. - + Create a new CONVERT-expression. - The that should be converted to . + The that should be converted to . - + - Counts a . + Counts a . - + Create a new COUNT-expression. - The actual that should be counted. + The actual that should be counted. - + Adds a date part to a or . - + Create a new DATEADD-expression. The to add to. The interval to add. - + Create a new DATEADD-expression. The to add to. The interval to add. - + Gets the difference between two s or s. - + Create a new DATEDIFF expression. The left hand side of the date diff. The right hand side of the date diff. - + Create a new DATEDIFF expression. The left hand side of the date diff. The right hand side of the date diff. - + Gets the day-component of a or . - + Create a new DAY-expression for a . The to get the day-component from. - + Create a new DAY-expression for a . The to get the day-component from. - + - Allows s to be summed. + Allows s to be summed. - + Sums the . - The SqlExpression<int> to sum. - A representing the summed total. + The SqlExpression<int> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<int?> to sum. - A representing the summed total. + The SqlExpression<int?> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<long> to sum. - A representing the summed total. + The SqlExpression<long> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<long?> to sum. - A representing the summed total. + The SqlExpression<long?> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<decimal> to sum. - A representing the summed total. + The SqlExpression<decimal> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<decimal?> to sum. - A representing the summed total. + The SqlExpression<decimal?> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<float> to sum. - A representing the summed total. + The SqlExpression<float> to sum. + A representing the summed total. - + Sums the . - The SqlExpression<float?> to sum. - A representing the summed total. + The SqlExpression<float?> to sum. + A representing the summed total. - + Gets the hour-component of a or . - + Create a new HOUR-expression. The to get the hour-component from. - + Create a new HOUR-expression. The to get the hour-component from. - + Gets the left part of a string. - + Create a new LEFT-expression. The string to apply this expression to. - + - Gets the maximum of a . + Gets the maximum of a . - + Create a new MAX-expression. - The actual where the maximum should be found. + The actual where the maximum should be found. - + - Gets the minimum of a . + Gets the minimum of a . - + Create a new MIN-expression. - The actual where the minimum should be found. + The actual where the minimum should be found. - + Gets the minute-component of a or . - + Create a new MINUTE-expression. The to get the minute-component from. - + Create a new MINUTE-expression. The to get the minute-component from. - + Gets the month-component of a or . - + Create a new MONTH-expression. The to get the month-component from. - + Create a new MONTH-expression. The to get the month-component from. - + Gets the right part of a string. - + Create a new LEFT-expression. The string to apply this expression to. - + Gets the second-component of a or . - + Create a new SECOND-expression. The to get the second-component from. - + Create a new SECOND-expression. The to get the second-component from. - + Gets a substring of a string. - + Create a new SUBSTRING-expression. The string to apply this expression to. - + - Sums a . + Sums a . - + Create a new SUM-expression. - The actual that should be summed. + The actual that should be summed. - + Trims a string. - + Create a new TRIM-expression. The string to trim. - + Gets the year-component of a or . - + Create a new YEAR-expression. The to get the year-component from. - + Create a new YEAR-expression. The to get the year-component from. - + Used when the query does not have parameters. - + A component of a query. @@ -622,12 +651,12 @@ The result type of the query. - + - Gets the underlying . + Gets the underlying . - + The context containing all components of the query. @@ -636,51 +665,51 @@ The result type of the query. - + - Create a new . + Create a new . - The for this query. + The for this query. - + - Create a new . + Create a new . - The to copy the components from. + The to copy the components from. - + The context containing all components of a parameterless query. The result type of the query. - + - + - + - Create a parameterized version of this . + Create a parameterized version of this . The parameters required for executing the query. The parameterized version. - + An alias. - + Create a new alias. The alias. - + The DISTINCT-statement that selects unique records. @@ -689,35 +718,35 @@ The result type of the query. - + Create a new DISTINCT-statement. - The . + The . - + - + The EXISTS-statement that tests for the existence of a record. The result type of the query. - + Create a new EXISTS-statement. The query that will check the existence of records. - + - Convert this to a bool, + Convert this to a bool, so that it can be used in a WHERE. - The to convert. + The to convert. - + The EXISTS-statement that tests for the existence of a record. @@ -726,25 +755,25 @@ The result type of the query. - + Create a new EXISTS-statement. The query that will check the existence of records. - + - Convert this to a bool, + Convert this to a bool, so that it can be used in a WHERE. - The to convert. + The to convert. - + Adds DISTINCT to the SELECT of a query. - + The DISTINCT-statement that selects unique records. @@ -752,14 +781,14 @@ The parameters required for executing this query. The result type of the query. - The . + The . - + Adds EXISTS to a query. - + The EXISTS-statement. @@ -767,23 +796,23 @@ The parameters required for executing this query. The result type of the query. - The that tests for the existence of a record. - The . + The that tests for the existence of a record. + The . - + The EXISTS-statement. The result type of the query. - The that tests for the existence of a record. - The . + The that tests for the existence of a record. + The . - + Adds FROM to a query. - + Add a new FROM to the query. @@ -793,18 +822,18 @@ The result type of the query. The where to select - s from. + s from. - The . + The . The expression for selecting . - The . + The . - + Adds GROUP BY to a query. - + Add a new GROUP BY to the query. @@ -813,21 +842,21 @@ The result type of the query. The expression to group by. - The . + The . The Expression<Func<TSqlExpression>> that indicates on which columns to group. - The . + The . - + Adds JOIN to a query. - + Add a new LEFT JOIN to the query. @@ -836,13 +865,13 @@ The result type of the query. The child table. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - The . + The . - + Add a new LEFT JOIN with a subquery to the query. @@ -851,14 +880,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TParameters, TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new LEFT JOIN with a subquery to the query. @@ -867,14 +896,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new RIGHT JOIN to the query. @@ -883,13 +912,13 @@ The result type of the query. The child table. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - The . + The . - + Add a new RIGHT JOIN with a subquery to the query. @@ -898,14 +927,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TParameters, TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new RIGHT JOIN with a subquery to the query. @@ -914,14 +943,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new INNER JOIN to the query. @@ -930,13 +959,13 @@ The result type of the query. The child table. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - The . + The . - + Add a new INNER JOIN with a subquery to the query. @@ -945,14 +974,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TParameters, TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new INNER JOIN with a subquery to the query. @@ -961,14 +990,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new OUTER JOIN to the query. @@ -977,13 +1006,13 @@ The result type of the query. The child table. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - The . + The . - + Add a new OUTER JOIN with a subquery to the query. @@ -992,14 +1021,14 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TParameters, TSubqueryResult>>> that selects the child to join with. - The . + The . - + Add a new OUTER JOIN with a subquery to the query. @@ -1008,19 +1037,19 @@ The result type of the query. The result type of the . - The . + The . The Expression<Func<Query<TSubqueryResult>>> that selects the child to join with. - The . + The . - + Adds LIMIT to the SELECT of a query. - + Limits the number of results. @@ -1028,14 +1057,14 @@ The parameters required for executing this query. The result type of the query. - The . + The . - + Adds ORDER BY to a query. - + Add a new ORDER BY to the query. @@ -1044,21 +1073,21 @@ The result type of the query. The expression to order by. - The . + The . The Expression<Func<TSqlExpression>> that indicates on which columns to order. - The . + The . - + Adds SELECT to a query. - + Add a SELECT to this query. @@ -1067,18 +1096,18 @@ The result type of the query. The - The . + The . The Expression<Func<TSqlExpression>> to select. - The . + The . - + Adds UNION and UNION ALL to a query. - + UNION a query with an other query. @@ -1090,7 +1119,7 @@ The second query. The union of and . - + UNION a query with an other query. @@ -1102,7 +1131,7 @@ The second query. The union of and . - + UNION a query with an other query. @@ -1114,7 +1143,7 @@ The second query. The union of and . - + UNION ALL a query with an other query. @@ -1126,7 +1155,7 @@ The second query. The union all of and . - + UNION ALL a query with an other query. @@ -1138,7 +1167,7 @@ The second query. The union al of and . - + UNION ALL a query with an other query. @@ -1150,12 +1179,12 @@ The second query. The union al of and . - + Adds WHERE to a query. - + Add a new WHERE to the query. @@ -1163,26 +1192,26 @@ The parameters required for executing this query. The result type of the query. - The . + The . The Expression<Func<TTable, bool>> that indicates on which columns to join. - The . + The . - + Add a new WHERE to the query. The result type of the query. - The . + The . The Expression<Func<bool>> that indicates on which columns to join. - The . + The . - + The FROM-statement of a query. @@ -1191,20 +1220,20 @@ The result type of the query. - The table where to select s from. + The table where to select s from. - + Create a new FROM-statement. - The . + The . The expression for selecting . - + - + The GROUP BY-statement of a query. @@ -1214,17 +1243,17 @@ The result type of the query. The expression to group by. - + Create a new GROUP BY-statement. - The . + The . The to select. - + - + The INNER JOIN-statement of a query. @@ -1234,16 +1263,16 @@ The result type of the query. The child table. - + Create a new INNER JOIN-statement. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - + A JOIN-statement of a query. @@ -1253,16 +1282,16 @@ The result type of the query. The child table. - + Create a new JOIN-statement. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - + Adds the ON to indicate on which columns to join. @@ -1272,7 +1301,7 @@ this for method chaining. - + Adds the ON to indicate on which columns to join. @@ -1282,10 +1311,10 @@ this for method chaining. - + - + The LEFT JOIN-statement of a query. @@ -1295,16 +1324,16 @@ The result type of the query. The child table. - + Create a new LEFT JOIN-statement. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - + Limits the number of results. @@ -1313,17 +1342,17 @@ The result type of the query. - + Create a new LIMIT-statement. - The . + The . The number of rows. - + - + The ORDER BY-statement of a query. @@ -1333,29 +1362,29 @@ The result type of the query. The expression to order by. - + Create a new ORDER BY-statement. - The . + The . The Expression<Func<TSqlExpression>> to select. - + Apply the ordering ascending. - + Apply the ordering descending. - + - + The OUTER JOIN-statement of a query. @@ -1365,16 +1394,16 @@ The result type of the query. The child table. - + Create a new OUTER JOIN-statement. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - + The RIGHT JOIN-statement of a query. @@ -1384,18 +1413,18 @@ The result type of the query. The child table. - + Create a new RIGHT JOIN-statement. - The . + The . The Expression<Func<TTable>> that selects the child to join with. - + - The SELECT-statement of a . + The SELECT-statement of a . The parameters required for executing this query. @@ -1403,23 +1432,23 @@ The result type of the query. The expression to select. - + Create a new SELECT-statement. - The . + The . The Expression<Func<TSqlExpression>> to select. - + Sets the alias under which this expression will be known. The alias. this for method chaining. - + Sets the alias under which this expression will be known where the name is derived from a property in the class . @@ -1427,27 +1456,27 @@ The alias. this for method chaining. - + - + Represents a subquery to use in a different query. The result type of the query. - + Create a new subquery. The underlying query. - + The of the underlying query. - + Represents a subquery to use in a different query. @@ -1456,18 +1485,18 @@ The result type of the query. - + Create a new subquery. The underlying query. - + The of the underlying query. - + The UNION ALL-statement for combining two queries, filtering out duplicates. @@ -1480,17 +1509,17 @@ without parameters. - + Create a new UNION-statement. The first query. The second query. - + - + The UNION ALL-statement for combining two queries, allowing duplicates. @@ -1503,17 +1532,17 @@ without parameters. - + Create a new UNION ALL-statement. The first query. The second query. - + - + The WHERE-statement of a query. @@ -1522,14 +1551,14 @@ The result type of the query. - + Create a new WHERE-statement. - The . + The . The expression that represents the condition. - + diff --git a/docs/conf.py b/docs/conf.py index a834953..c7826b1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,8 +47,8 @@ # General information about the project. project = 'Fluent SQL' -copyright = '2019, Jeroen Weelink' -author = 'Jeroen Weelink' +copyright = '2019, FluentSQL' +author = 'FluentSQL' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -140,7 +140,7 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'FluentSQL.tex', 'Fluent SQL Documentation', - 'Jeroen Weelink', 'manual'), + 'FluentSQL', 'manual'), ] diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json index d51ffd1..baecb22 100644 --- a/src/.vscode/launch.json +++ b/src/.vscode/launch.json @@ -10,9 +10,9 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/Weelink-IT.FluentSQL.Tests/bin/Debug/netcoreapp2.1/Weelink-IT.FluentSQL.Tests.dll", + "program": "${workspaceFolder}/FluentSQL.Tests/bin/Debug/netcoreapp2.1/FluentSQL.Tests.dll", "args": [], - "cwd": "${workspaceFolder}/Weelink-IT.FluentSQL.Tests", + "cwd": "${workspaceFolder}/FluentSQL.Tests", // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window "console": "internalConsole", "stopAtEntry": false diff --git a/src/.vscode/tasks.json b/src/.vscode/tasks.json index f3dcb3a..1234224 100644 --- a/src/.vscode/tasks.json +++ b/src/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" }, @@ -17,7 +17,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" }, @@ -28,7 +28,7 @@ "args": [ "watch", "run", - "${workspaceFolder}/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj" + "${workspaceFolder}/FluentSQL.Tests/FluentSQL.Tests.csproj" ], "problemMatcher": "$tsc" } diff --git a/src/Weelink-IT.FluentSQL.Tests/Api/ApiDesign.cs b/src/FluentSQL.Tests/Api/ApiDesign.cs similarity index 91% rename from src/Weelink-IT.FluentSQL.Tests/Api/ApiDesign.cs rename to src/FluentSQL.Tests/Api/ApiDesign.cs index e521964..ca1b42b 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Api/ApiDesign.cs +++ b/src/FluentSQL.Tests/Api/ApiDesign.cs @@ -1,14 +1,16 @@ -using System.Threading.Tasks; +using System.Data; +using System.Threading.Tasks; -using WeelinkIT.FluentSQL.Databases.SqlServer; -using WeelinkIT.FluentSQL.Querying.Extensions; -using WeelinkIT.FluentSQL.Querying.Functions.Extensions; -using WeelinkIT.FluentSQL.Querying.Statements.Extensions; -using WeelinkIT.FluentSQL.Tests.Examples; +using FluentSQL.Databases.SqlServer; +using FluentSQL.Extensions; +using FluentSQL.Querying.Extensions; +using FluentSQL.Querying.Functions.Extensions; +using FluentSQL.Querying.Statements.Extensions; +using FluentSQL.Tests.Examples; using Xunit; -namespace WeelinkIT.FluentSQL.Tests.Api +namespace FluentSQL.Tests.Api { public sealed class ApiDesign { @@ -29,6 +31,8 @@ public class SubqueryResult public int InvoiceIdFromSubquery { get; set; } } + private IDbConnection SomeConnection { get; } + [Fact] public async Task TestApi() { @@ -52,7 +56,7 @@ public async Task TestApi() .Select(() => model.Customers.Name) .Compile(); - int parameterlessResult = await parameterless.ExecuteAsync(); + int parameterlessResult = await SomeConnection.ExecuteAsync(parameterless); /* * SELECT i2.invoice_number AS InvoiceIdFromSubquery @@ -109,7 +113,7 @@ public async Task TestApi() .Limit(100) .Compile(); - int parameterizedResult = await parameterized.ExecuteAsync(p => + int parameterizedResult = await SomeConnection.ExecuteAsync(parameterized, p => { p.Limit = 100; p.InvoiceNumber = "2019"; @@ -163,7 +167,7 @@ public async Task TestApi() .Select(() => model.Customers.Id)))) .Compile(); - UnionResult unionResult = await unionQuery.ExecuteAsync(p => + UnionResult unionResult = await SomeConnection.ExecuteAsync(unionQuery, p => { p.Limit = 122; }); diff --git a/src/Weelink-IT.FluentSQL.Tests/AsyncPump.cs b/src/FluentSQL.Tests/AsyncPump.cs similarity index 99% rename from src/Weelink-IT.FluentSQL.Tests/AsyncPump.cs rename to src/FluentSQL.Tests/AsyncPump.cs index 1995efd..f90b261 100644 --- a/src/Weelink-IT.FluentSQL.Tests/AsyncPump.cs +++ b/src/FluentSQL.Tests/AsyncPump.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace WeelinkIT.FluentSQL.Tests +namespace FluentSQL.Tests { /// /// Provides a pump that supports running asynchronous methods on the current thread. diff --git a/src/Weelink-IT.FluentSQL.Tests/AsyncSpecification.cs b/src/FluentSQL.Tests/AsyncSpecification.cs similarity index 95% rename from src/Weelink-IT.FluentSQL.Tests/AsyncSpecification.cs rename to src/FluentSQL.Tests/AsyncSpecification.cs index d838818..a573e36 100644 --- a/src/Weelink-IT.FluentSQL.Tests/AsyncSpecification.cs +++ b/src/FluentSQL.Tests/AsyncSpecification.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace WeelinkIT.FluentSQL.Tests +namespace FluentSQL.Tests { public abstract class AsyncSpecification : Specification { diff --git a/src/Weelink-IT.FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs b/src/FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs similarity index 73% rename from src/Weelink-IT.FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs rename to src/FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs index 85a3c0e..a662b0c 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs +++ b/src/FluentSQL.Tests/Compilation/Builders/QueryCompilerBuilder.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Compilation; +using FluentSQL.Compilation; -namespace WeelinkIT.FluentSQL.Tests.Compilation.Builders +namespace FluentSQL.Tests.Compilation.Builders { public class QueryCompilerBuilder : TestDataBuilder { diff --git a/src/Weelink-IT.FluentSQL.Tests/Compilation/QueryCompilerTests.cs b/src/FluentSQL.Tests/Compilation/QueryCompilerTests.cs similarity index 73% rename from src/Weelink-IT.FluentSQL.Tests/Compilation/QueryCompilerTests.cs rename to src/FluentSQL.Tests/Compilation/QueryCompilerTests.cs index 80c5d09..1dc705d 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Compilation/QueryCompilerTests.cs +++ b/src/FluentSQL.Tests/Compilation/QueryCompilerTests.cs @@ -1,17 +1,17 @@ using FluentAssertions; -using WeelinkIT.FluentSQL.Compilation; -using WeelinkIT.FluentSQL.Databases; -using WeelinkIT.FluentSQL.Querying; -using WeelinkIT.FluentSQL.Querying.Extensions; -using WeelinkIT.FluentSQL.Querying.Statements.Extensions; -using WeelinkIT.FluentSQL.Tests.Compilation.Builders; -using WeelinkIT.FluentSQL.Tests.Databases.Builders; -using WeelinkIT.FluentSQL.Tests.Examples; +using FluentSQL.Compilation; +using FluentSQL.Databases; +using FluentSQL.Querying; +using FluentSQL.Querying.Extensions; +using FluentSQL.Querying.Statements.Extensions; +using FluentSQL.Tests.Compilation.Builders; +using FluentSQL.Tests.Databases.Builders; +using FluentSQL.Tests.Examples; using Xunit; -namespace WeelinkIT.FluentSQL.Tests.Compilation +namespace FluentSQL.Tests.Compilation { public class QueryCompilerTests { diff --git a/src/Weelink-IT.FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs b/src/FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs similarity index 80% rename from src/Weelink-IT.FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs rename to src/FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs index 6a9c3df..35079e7 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs +++ b/src/FluentSQL.Tests/Databases/Builders/DatabaseBuilder.cs @@ -1,8 +1,8 @@ -using WeelinkIT.FluentSQL.Compilation; -using WeelinkIT.FluentSQL.Databases; -using WeelinkIT.FluentSQL.Tests.Compilation.Builders; +using FluentSQL.Compilation; +using FluentSQL.Databases; +using FluentSQL.Tests.Compilation.Builders; -namespace WeelinkIT.FluentSQL.Tests.Databases.Builders +namespace FluentSQL.Tests.Databases.Builders { public class DatabaseBuilder : TestDataBuilder { diff --git a/src/Weelink-IT.FluentSQL.Tests/Examples/Customers.cs b/src/FluentSQL.Tests/Examples/Customers.cs similarity index 67% rename from src/Weelink-IT.FluentSQL.Tests/Examples/Customers.cs rename to src/FluentSQL.Tests/Examples/Customers.cs index 2127c05..179c363 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Examples/Customers.cs +++ b/src/FluentSQL.Tests/Examples/Customers.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Tests.Examples +namespace FluentSQL.Tests.Examples { public class Customers : Table { diff --git a/src/Weelink-IT.FluentSQL.Tests/Examples/ExampleModel.cs b/src/FluentSQL.Tests/Examples/ExampleModel.cs similarity index 74% rename from src/Weelink-IT.FluentSQL.Tests/Examples/ExampleModel.cs rename to src/FluentSQL.Tests/Examples/ExampleModel.cs index 33ad000..ef59af6 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Examples/ExampleModel.cs +++ b/src/FluentSQL.Tests/Examples/ExampleModel.cs @@ -1,7 +1,7 @@ -using WeelinkIT.FluentSQL.Databases; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Databases; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Tests.Examples +namespace FluentSQL.Tests.Examples { public class ExampleModel : PersistenceModel { diff --git a/src/Weelink-IT.FluentSQL.Tests/Examples/InvoiceLines.cs b/src/FluentSQL.Tests/Examples/InvoiceLines.cs similarity index 76% rename from src/Weelink-IT.FluentSQL.Tests/Examples/InvoiceLines.cs rename to src/FluentSQL.Tests/Examples/InvoiceLines.cs index 0f10e63..76c4cf5 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Examples/InvoiceLines.cs +++ b/src/FluentSQL.Tests/Examples/InvoiceLines.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Tests.Examples +namespace FluentSQL.Tests.Examples { public class InvoiceLines : Table { diff --git a/src/Weelink-IT.FluentSQL.Tests/Examples/Invoices.cs b/src/FluentSQL.Tests/Examples/Invoices.cs similarity index 81% rename from src/Weelink-IT.FluentSQL.Tests/Examples/Invoices.cs rename to src/FluentSQL.Tests/Examples/Invoices.cs index 0e0beaf..7373e35 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Examples/Invoices.cs +++ b/src/FluentSQL.Tests/Examples/Invoices.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Tests.Examples +namespace FluentSQL.Tests.Examples { public class Invoices : Table { diff --git a/src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj b/src/FluentSQL.Tests/FluentSQL.Tests.csproj similarity index 75% rename from src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj rename to src/FluentSQL.Tests/FluentSQL.Tests.csproj index 5fbd4f9..0651c74 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Weelink-IT.FluentSQL.Tests.csproj +++ b/src/FluentSQL.Tests/FluentSQL.Tests.csproj @@ -2,7 +2,10 @@ netcoreapp2.1 - WeelinkIT.FluentSQL.Tests + FluentSQL.Tests + + Library + @@ -16,7 +19,7 @@ - + diff --git a/src/Weelink-IT.FluentSQL.Tests/Specification.cs b/src/FluentSQL.Tests/Specification.cs similarity index 95% rename from src/Weelink-IT.FluentSQL.Tests/Specification.cs rename to src/FluentSQL.Tests/Specification.cs index 1d903d5..fa8908b 100644 --- a/src/Weelink-IT.FluentSQL.Tests/Specification.cs +++ b/src/FluentSQL.Tests/Specification.cs @@ -1,6 +1,6 @@ using System; -namespace WeelinkIT.FluentSQL.Tests +namespace FluentSQL.Tests { public abstract class Specification : IDisposable { diff --git a/src/Weelink-IT.FluentSQL.Tests/TestDataBuilder.cs b/src/FluentSQL.Tests/TestDataBuilder.cs similarity index 91% rename from src/Weelink-IT.FluentSQL.Tests/TestDataBuilder.cs rename to src/FluentSQL.Tests/TestDataBuilder.cs index 23d8aa2..9a3711a 100644 --- a/src/Weelink-IT.FluentSQL.Tests/TestDataBuilder.cs +++ b/src/FluentSQL.Tests/TestDataBuilder.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Tests +namespace FluentSQL.Tests { public abstract class TestDataBuilder { diff --git a/src/Weelink-IT.FluentSQL/Compilation/CompilationResult.cs b/src/FluentSQL/Compilation/CompilationResult.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Compilation/CompilationResult.cs rename to src/FluentSQL/Compilation/CompilationResult.cs index 87780fc..919f550 100644 --- a/src/Weelink-IT.FluentSQL/Compilation/CompilationResult.cs +++ b/src/FluentSQL/Compilation/CompilationResult.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Compilation +namespace FluentSQL.Compilation { /// /// The result of the compilation of a query. diff --git a/src/Weelink-IT.FluentSQL/Compilation/QueryCompiler.cs b/src/FluentSQL/Compilation/QueryCompiler.cs similarity index 91% rename from src/Weelink-IT.FluentSQL/Compilation/QueryCompiler.cs rename to src/FluentSQL/Compilation/QueryCompiler.cs index 65328f3..59b7617 100644 --- a/src/Weelink-IT.FluentSQL/Compilation/QueryCompiler.cs +++ b/src/FluentSQL/Compilation/QueryCompiler.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Querying; +using FluentSQL.Querying; -namespace WeelinkIT.FluentSQL.Compilation +namespace FluentSQL.Compilation { /// /// Compiles a to a query. diff --git a/src/Weelink-IT.FluentSQL/Databases/Database.cs b/src/FluentSQL/Databases/Database.cs similarity index 66% rename from src/Weelink-IT.FluentSQL/Databases/Database.cs rename to src/FluentSQL/Databases/Database.cs index c2391a6..2457155 100644 --- a/src/Weelink-IT.FluentSQL/Databases/Database.cs +++ b/src/FluentSQL/Databases/Database.cs @@ -1,10 +1,7 @@ -using System.Data; -using System.Threading.Tasks; +using FluentSQL.Compilation; +using FluentSQL.Querying; -using WeelinkIT.FluentSQL.Compilation; -using WeelinkIT.FluentSQL.Querying; - -namespace WeelinkIT.FluentSQL.Databases +namespace FluentSQL.Databases { /// /// Represents the database. @@ -33,7 +30,7 @@ protected Database(QueryCompiler compiler) where TParameters : new() { CompilationResult result = Compiler.Compile(queryContext); - return new Query(this, result.CommandText); + return new Query(result); } /// @@ -47,20 +44,7 @@ internal Query Compile(QueryContext(queryContext); CompilationResult result = Compiler.Compile(contextWithoutParameters); - return new Query(this, result.CommandText); - } - - /// - /// Execute the query. - /// - /// The optional transaction. - /// The SQL to execute. - /// The optional parameters. - /// The result type of the query. - /// The result of the query. - internal Task QueryAsync(IDbTransaction transaction, string commandText, object parameters = null) - { - return Task.FromResult(default(TQueryResult)); + return new Query(result); } private QueryCompiler Compiler { get; } diff --git a/src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerDatabase.cs b/src/FluentSQL/Databases/SqlServer/SqlServerDatabase.cs similarity index 87% rename from src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerDatabase.cs rename to src/FluentSQL/Databases/SqlServer/SqlServerDatabase.cs index 84e7f96..4bd6ac1 100644 --- a/src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerDatabase.cs +++ b/src/FluentSQL/Databases/SqlServer/SqlServerDatabase.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Databases.SqlServer +namespace FluentSQL.Databases.SqlServer { /// /// Represents a SQL Server database. diff --git a/src/FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs b/src/FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs new file mode 100644 index 0000000..175f167 --- /dev/null +++ b/src/FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs @@ -0,0 +1,12 @@ +using FluentSQL.Compilation; +using FluentSQL.Querying; + +namespace FluentSQL.Databases.SqlServer +{ + /// + /// Compiles a to a query for SQL Server. + /// + public class SqlServerQueryCompiler : QueryCompiler + { + } +} diff --git a/src/Weelink-IT.FluentSQL/Extensions/QueryExtensions.cs b/src/FluentSQL/Extensions/QueryExtensions.cs similarity index 97% rename from src/Weelink-IT.FluentSQL/Extensions/QueryExtensions.cs rename to src/FluentSQL/Extensions/QueryExtensions.cs index 08eca6f..7a37c85 100644 --- a/src/Weelink-IT.FluentSQL/Extensions/QueryExtensions.cs +++ b/src/FluentSQL/Extensions/QueryExtensions.cs @@ -2,7 +2,7 @@ using System.Data; using System.Threading.Tasks; -namespace WeelinkIT.FluentSQL.Extensions +namespace FluentSQL.Extensions { /// /// Extends for executing queries. diff --git a/src/Weelink-IT.FluentSQL/Weelink-IT.FluentSQL.csproj b/src/FluentSQL/FluentSQL.csproj similarity index 69% rename from src/Weelink-IT.FluentSQL/Weelink-IT.FluentSQL.csproj rename to src/FluentSQL/FluentSQL.csproj index 385edde..ca3fb00 100644 --- a/src/Weelink-IT.FluentSQL/Weelink-IT.FluentSQL.csproj +++ b/src/FluentSQL/FluentSQL.csproj @@ -2,13 +2,13 @@ netstandard2.0 - WeelinkIT.FluentSQL + FluentSQL true - ..\..\docs\api\Weelink-IT.FluentSQL.xml + ..\..\docs\api\FluentSQL.xml diff --git a/src/Weelink-IT.FluentSQL/Modelling/Column.cs b/src/FluentSQL/Modelling/Column.cs similarity index 82% rename from src/Weelink-IT.FluentSQL/Modelling/Column.cs rename to src/FluentSQL/Modelling/Column.cs index 9d39713..46ce02f 100644 --- a/src/Weelink-IT.FluentSQL/Modelling/Column.cs +++ b/src/FluentSQL/Modelling/Column.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Modelling +namespace FluentSQL.Modelling { /// /// Represents a column. diff --git a/src/Weelink-IT.FluentSQL/Modelling/PersistenceModel.cs b/src/FluentSQL/Modelling/PersistenceModel.cs similarity index 88% rename from src/Weelink-IT.FluentSQL/Modelling/PersistenceModel.cs rename to src/FluentSQL/Modelling/PersistenceModel.cs index 5eccf03..9662a43 100644 --- a/src/Weelink-IT.FluentSQL/Modelling/PersistenceModel.cs +++ b/src/FluentSQL/Modelling/PersistenceModel.cs @@ -1,7 +1,7 @@ -using WeelinkIT.FluentSQL.Databases; -using WeelinkIT.FluentSQL.Querying; +using FluentSQL.Databases; +using FluentSQL.Querying; -namespace WeelinkIT.FluentSQL.Modelling +namespace FluentSQL.Modelling { /// /// Represents the model in the database. diff --git a/src/Weelink-IT.FluentSQL/Modelling/SqlExpression.cs b/src/FluentSQL/Modelling/SqlExpression.cs similarity index 99% rename from src/Weelink-IT.FluentSQL/Modelling/SqlExpression.cs rename to src/FluentSQL/Modelling/SqlExpression.cs index 3d4af35..d41de1a 100644 --- a/src/Weelink-IT.FluentSQL/Modelling/SqlExpression.cs +++ b/src/FluentSQL/Modelling/SqlExpression.cs @@ -1,6 +1,6 @@ using System; -namespace WeelinkIT.FluentSQL.Modelling +namespace FluentSQL.Modelling { /// /// Any expression of type that can be used in SQL. diff --git a/src/Weelink-IT.FluentSQL/Modelling/Table.cs b/src/FluentSQL/Modelling/Table.cs similarity index 73% rename from src/Weelink-IT.FluentSQL/Modelling/Table.cs rename to src/FluentSQL/Modelling/Table.cs index e91dae7..860c2cf 100644 --- a/src/Weelink-IT.FluentSQL/Modelling/Table.cs +++ b/src/FluentSQL/Modelling/Table.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Modelling +namespace FluentSQL.Modelling { /// /// Represents a table. diff --git a/src/FluentSQL/Query.cs b/src/FluentSQL/Query.cs new file mode 100644 index 0000000..95eb99f --- /dev/null +++ b/src/FluentSQL/Query.cs @@ -0,0 +1,43 @@ +using FluentSQL.Compilation; + +namespace FluentSQL +{ + /// + /// The compiled query to execute. + /// + /// The result type. + /// + /// The parameters required for executing this query. + /// + public class Query where TParameters : new() + { + /// + /// Create a new query. + /// + /// The result of the compilation. + internal Query(CompilationResult compilationResult) + { + CompilationResult = compilationResult; + } + + private CompilationResult CompilationResult { get; } + } + + /// + /// The compiled query to execute. + /// + /// The result type. + public class Query + { + /// + /// Create a new query. + /// + /// The result of the compilation. + public Query(CompilationResult compilationResult) + { + CompilationResult = compilationResult; + } + + private CompilationResult CompilationResult { get; } + } +} diff --git a/src/Weelink-IT.FluentSQL/Querying/Extensions/ExpressionExtensions.cs b/src/FluentSQL/Querying/Extensions/ExpressionExtensions.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Extensions/ExpressionExtensions.cs rename to src/FluentSQL/Querying/Extensions/ExpressionExtensions.cs index c22741e..378ac19 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Extensions/ExpressionExtensions.cs +++ b/src/FluentSQL/Querying/Extensions/ExpressionExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Extensions +namespace FluentSQL.Querying.Extensions { /// /// Extends . diff --git a/src/Weelink-IT.FluentSQL/Querying/Extensions/QueryContextExtensions.cs b/src/FluentSQL/Querying/Extensions/QueryContextExtensions.cs similarity index 98% rename from src/Weelink-IT.FluentSQL/Querying/Extensions/QueryContextExtensions.cs rename to src/FluentSQL/Querying/Extensions/QueryContextExtensions.cs index 76ff95a..40b1d54 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Extensions/QueryContextExtensions.cs +++ b/src/FluentSQL/Querying/Extensions/QueryContextExtensions.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Extensions +namespace FluentSQL.Querying.Extensions { /// /// Extends s. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Average.cs b/src/FluentSQL/Querying/Functions/Average.cs similarity index 86% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Average.cs rename to src/FluentSQL/Querying/Functions/Average.cs index d3e24b4..8e94969 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Average.cs +++ b/src/FluentSQL/Querying/Functions/Average.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Averages a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Cast.cs b/src/FluentSQL/Querying/Functions/Cast.cs similarity index 89% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Cast.cs rename to src/FluentSQL/Querying/Functions/Cast.cs index c39ecb1..08e15bb 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Cast.cs +++ b/src/FluentSQL/Querying/Functions/Cast.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Casts a SqlExpression<TFrom> to diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Convert.cs b/src/FluentSQL/Querying/Functions/Convert.cs similarity index 89% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Convert.cs rename to src/FluentSQL/Querying/Functions/Convert.cs index c5b9711..9774b1b 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Convert.cs +++ b/src/FluentSQL/Querying/Functions/Convert.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Convert a SqlExpression<TFrom> to diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Count.cs b/src/FluentSQL/Querying/Functions/Count.cs similarity index 86% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Count.cs rename to src/FluentSQL/Querying/Functions/Count.cs index 5131156..8c07d4c 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Count.cs +++ b/src/FluentSQL/Querying/Functions/Count.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Counts a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/DateAdd.cs b/src/FluentSQL/Querying/Functions/DateAdd.cs similarity index 93% rename from src/Weelink-IT.FluentSQL/Querying/Functions/DateAdd.cs rename to src/FluentSQL/Querying/Functions/DateAdd.cs index 84f71d2..0bfd83a 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/DateAdd.cs +++ b/src/FluentSQL/Querying/Functions/DateAdd.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Adds a date part to a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/DateDiff.cs b/src/FluentSQL/Querying/Functions/DateDiff.cs similarity index 94% rename from src/Weelink-IT.FluentSQL/Querying/Functions/DateDiff.cs rename to src/FluentSQL/Querying/Functions/DateDiff.cs index 31d651f..24fcd0a 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/DateDiff.cs +++ b/src/FluentSQL/Querying/Functions/DateDiff.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the difference between two s or s. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Day.cs b/src/FluentSQL/Querying/Functions/Day.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Day.cs rename to src/FluentSQL/Querying/Functions/Day.cs index 61cbf27..90ddcc5 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Day.cs +++ b/src/FluentSQL/Querying/Functions/Day.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the day-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Extensions/SumExtensions.cs b/src/FluentSQL/Querying/Functions/Extensions/SumExtensions.cs similarity index 97% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Extensions/SumExtensions.cs rename to src/FluentSQL/Querying/Functions/Extensions/SumExtensions.cs index 8fe270c..cc36fc3 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Extensions/SumExtensions.cs +++ b/src/FluentSQL/Querying/Functions/Extensions/SumExtensions.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions.Extensions +namespace FluentSQL.Querying.Functions.Extensions { /// /// Allows s to be summed. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Hour.cs b/src/FluentSQL/Querying/Functions/Hour.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Hour.cs rename to src/FluentSQL/Querying/Functions/Hour.cs index 049dbf0..236f275 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Hour.cs +++ b/src/FluentSQL/Querying/Functions/Hour.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the hour-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Left.cs b/src/FluentSQL/Querying/Functions/Left.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Left.cs rename to src/FluentSQL/Querying/Functions/Left.cs index 58da2f7..a72785b 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Left.cs +++ b/src/FluentSQL/Querying/Functions/Left.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the left part of a string. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Max.cs b/src/FluentSQL/Querying/Functions/Max.cs similarity index 86% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Max.cs rename to src/FluentSQL/Querying/Functions/Max.cs index 2f014ef..67b1d55 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Max.cs +++ b/src/FluentSQL/Querying/Functions/Max.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the maximum of a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Min.cs b/src/FluentSQL/Querying/Functions/Min.cs similarity index 86% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Min.cs rename to src/FluentSQL/Querying/Functions/Min.cs index 88bc6c8..8ae9754 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Min.cs +++ b/src/FluentSQL/Querying/Functions/Min.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the minimum of a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Minute.cs b/src/FluentSQL/Querying/Functions/Minute.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Minute.cs rename to src/FluentSQL/Querying/Functions/Minute.cs index 227dd0f..54e1ac1 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Minute.cs +++ b/src/FluentSQL/Querying/Functions/Minute.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the minute-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Month.cs b/src/FluentSQL/Querying/Functions/Month.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Month.cs rename to src/FluentSQL/Querying/Functions/Month.cs index eeec115..5475843 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Month.cs +++ b/src/FluentSQL/Querying/Functions/Month.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the month-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Right.cs b/src/FluentSQL/Querying/Functions/Right.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Right.cs rename to src/FluentSQL/Querying/Functions/Right.cs index 162373e..2d76f72 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Right.cs +++ b/src/FluentSQL/Querying/Functions/Right.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the right part of a string. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Second.cs b/src/FluentSQL/Querying/Functions/Second.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Second.cs rename to src/FluentSQL/Querying/Functions/Second.cs index 67180b8..214e4ff 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Second.cs +++ b/src/FluentSQL/Querying/Functions/Second.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the second-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Substring.cs b/src/FluentSQL/Querying/Functions/Substring.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Substring.cs rename to src/FluentSQL/Querying/Functions/Substring.cs index f21e5a2..04015f2 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Substring.cs +++ b/src/FluentSQL/Querying/Functions/Substring.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets a substring of a string. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Sum.cs b/src/FluentSQL/Querying/Functions/Sum.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Sum.cs rename to src/FluentSQL/Querying/Functions/Sum.cs index 43e6b54..aebad66 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Sum.cs +++ b/src/FluentSQL/Querying/Functions/Sum.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Sums a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Trim.cs b/src/FluentSQL/Querying/Functions/Trim.cs similarity index 84% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Trim.cs rename to src/FluentSQL/Querying/Functions/Trim.cs index a0218cb..2d1cbcb 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Trim.cs +++ b/src/FluentSQL/Querying/Functions/Trim.cs @@ -1,6 +1,6 @@ -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Trims a string. diff --git a/src/Weelink-IT.FluentSQL/Querying/Functions/Year.cs b/src/FluentSQL/Querying/Functions/Year.cs similarity index 92% rename from src/Weelink-IT.FluentSQL/Querying/Functions/Year.cs rename to src/FluentSQL/Querying/Functions/Year.cs index eba4721..12dafbd 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Functions/Year.cs +++ b/src/FluentSQL/Querying/Functions/Year.cs @@ -1,8 +1,8 @@ using System; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Functions +namespace FluentSQL.Querying.Functions { /// /// Gets the year-component of a or . diff --git a/src/Weelink-IT.FluentSQL/Querying/NoParameters.cs b/src/FluentSQL/Querying/NoParameters.cs similarity index 79% rename from src/Weelink-IT.FluentSQL/Querying/NoParameters.cs rename to src/FluentSQL/Querying/NoParameters.cs index 2bfec2d..59777db 100644 --- a/src/Weelink-IT.FluentSQL/Querying/NoParameters.cs +++ b/src/FluentSQL/Querying/NoParameters.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying +namespace FluentSQL.Querying { /// /// Used when the query does not have parameters. diff --git a/src/Weelink-IT.FluentSQL/Querying/QueryComponent.cs b/src/FluentSQL/Querying/QueryComponent.cs similarity index 93% rename from src/Weelink-IT.FluentSQL/Querying/QueryComponent.cs rename to src/FluentSQL/Querying/QueryComponent.cs index 7dcc0a4..7dca420 100644 --- a/src/Weelink-IT.FluentSQL/Querying/QueryComponent.cs +++ b/src/FluentSQL/Querying/QueryComponent.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying +namespace FluentSQL.Querying { /// /// A component of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/QueryContext.cs b/src/FluentSQL/Querying/QueryContext.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/QueryContext.cs rename to src/FluentSQL/Querying/QueryContext.cs index 1e0b841..1dea81e 100644 --- a/src/Weelink-IT.FluentSQL/Querying/QueryContext.cs +++ b/src/FluentSQL/Querying/QueryContext.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using WeelinkIT.FluentSQL.Databases; +using FluentSQL.Databases; -namespace WeelinkIT.FluentSQL.Querying +namespace FluentSQL.Querying { /// /// The context containing all components of the query. @@ -17,7 +17,7 @@ public class QueryContext where TParameters : new() /// /// Create a new . /// - /// The for this query. + /// The for this query. internal QueryContext(Database database) { FromComponents = new List>(); diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Alias.cs b/src/FluentSQL/Querying/Statements/Alias.cs similarity index 87% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Alias.cs rename to src/FluentSQL/Querying/Statements/Alias.cs index 6600a3f..396013f 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Alias.cs +++ b/src/FluentSQL/Querying/Statements/Alias.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// An alias. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Distinct.cs b/src/FluentSQL/Querying/Statements/Distinct.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Distinct.cs rename to src/FluentSQL/Querying/Statements/Distinct.cs index 70b8e8c..a0aaf5c 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Distinct.cs +++ b/src/FluentSQL/Querying/Statements/Distinct.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The DISTINCT-statement that selects unique records. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Exists.cs b/src/FluentSQL/Querying/Statements/Exists.cs similarity index 97% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Exists.cs rename to src/FluentSQL/Querying/Statements/Exists.cs index 7356167..00fd76a 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Exists.cs +++ b/src/FluentSQL/Querying/Statements/Exists.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The EXISTS-statement that tests for the existence of a record. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs similarity index 80% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs index 782e86e..6b90a8b 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/DistinctExtensions.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds DISTINCT to the SELECT of a query. @@ -12,7 +12,7 @@ public static class DistinctExtensions /// The parameters required for executing this query. /// /// The result type of the query. - /// The . + /// The . public static Distinct Distinct( this QueryComponent queryComponent) where TParameters : new() { diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs similarity index 82% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs index e3b9083..da7a37a 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/ExistsExtensions.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds EXISTS to a query. @@ -13,7 +13,7 @@ public static class ExistsExtensions /// /// The result type of the query. /// The that tests for the existence of a record. - /// The . + /// The . public static Exists Exists( this Query query) where TParameters : new() @@ -26,7 +26,7 @@ public static class ExistsExtensions /// /// The result type of the query. /// The that tests for the existence of a record. - /// The . + /// The . public static Exists Exists(this Query query) { return new Exists(query); diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/FromExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/FromExtensions.cs similarity index 88% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/FromExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/FromExtensions.cs index 967b46d..589b52e 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/FromExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/FromExtensions.cs @@ -1,7 +1,9 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +using FluentSQL.Modelling; + +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds FROM to a query. @@ -17,7 +19,7 @@ public static class FromExtensions /// The result type of the query. /// /// The where to select - /// s from. + /// s from. /// /// The . /// The expression for selecting . diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs similarity index 88% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs index 030b948..ec1d0b9 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/GroupByExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds GROUP BY to a query. @@ -22,7 +22,7 @@ public static class GroupByExtensions /// which columns to group. /// /// - /// The . + /// The . /// public static GroupBy GroupBy( this QueryComponent queryComponent, diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs similarity index 89% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs index dd5865c..86b6e3b 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/JoinExtensions.cs @@ -1,9 +1,9 @@ using System; using System.Linq.Expressions; -using WeelinkIT.FluentSQL.Modelling; +using FluentSQL.Modelling; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds JOIN to a query. @@ -22,7 +22,7 @@ public static class JoinExtensions /// /// The Expression<Func<TTable>> that selects the child to join with. /// - /// The . + /// The . public static LeftJoin LeftJoin( this QueryComponent queryComponent, Expression> child) @@ -45,7 +45,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TParameters, TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static LeftJoin LeftJoin( this QueryComponent queryComponent, Expression>> child) @@ -69,7 +69,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static LeftJoin LeftJoin( this QueryComponent queryComponent, Expression>> child) @@ -92,7 +92,7 @@ public static class JoinExtensions /// /// The Expression<Func<TTable>> that selects the child to join with. /// - /// The . + /// The . public static RightJoin RightJoin( this QueryComponent queryComponent, Expression> child) @@ -114,7 +114,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TParameters, TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static RightJoin RightJoin( this QueryComponent queryComponent, Expression>> child) @@ -138,7 +138,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static RightJoin RightJoin( this QueryComponent queryComponent, Expression>> child) @@ -161,7 +161,7 @@ public static class JoinExtensions /// /// The Expression<Func<TTable>> that selects the child to join with. /// - /// The . + /// The . public static InnerJoin InnerJoin( this QueryComponent queryComponent, Expression> child) @@ -183,7 +183,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TParameters, TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static InnerJoin InnerJoin( this QueryComponent queryComponent, Expression>> child) @@ -207,7 +207,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static InnerJoin InnerJoin( this QueryComponent queryComponent, Expression>> child) @@ -230,7 +230,7 @@ public static class JoinExtensions /// /// The Expression<Func<TTable>> that selects the child to join with. /// - /// The . + /// The . public static OuterJoin OuterJoin( this QueryComponent queryComponent, Expression> child) @@ -252,7 +252,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TParameters, TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static OuterJoin OuterJoin( this QueryComponent queryComponent, Expression>> child) @@ -276,7 +276,7 @@ public static class JoinExtensions /// The Expression<Func<Query<TSubqueryResult>>> /// that selects the child to join with. /// - /// The . + /// The . public static OuterJoin OuterJoin( this QueryComponent queryComponent, Expression>> child) diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs similarity index 80% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs index 069d48c..eeca8fc 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/LimitExtensions.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds LIMIT to the SELECT of a query. @@ -12,7 +12,7 @@ public static class LimitExtensions /// The parameters required for executing this query. /// /// The result type of the query. - /// The . + /// The . public static Limit Limit( this QueryComponent queryComponent, int limit) where TParameters : new() { diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs similarity index 88% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs index 901a6b7..4a87505 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/OrderByExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds ORDER BY to a query. @@ -22,7 +22,7 @@ public static class OrderByExtensions /// which columns to order. /// /// - /// The . + /// The . /// public static OrderBy OrderBy( this QueryComponent queryComponent, diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs similarity index 86% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs index c32e2a1..ea11a9e 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/SelectExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds SELECT to a query. @@ -20,7 +20,7 @@ public static class SelectExtensions /// /// The Expression<Func<TSqlExpression>> to select. /// - /// The . + /// The . public static Select Select( this QueryComponent queryComponent, Expression> expression) diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs similarity index 98% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs index 9b4e8cd..e7ed35d 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/UnionExtensions.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds UNION and UNION ALL to a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs b/src/FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs similarity index 85% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs rename to src/FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs index a266014..dfd4907 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs +++ b/src/FluentSQL/Querying/Statements/Extensions/WhereExtensions.cs @@ -1,9 +1,9 @@ using System; using System.Linq.Expressions; -using WeelinkIT.FluentSQL.Querying.Extensions; +using FluentSQL.Querying.Extensions; -namespace WeelinkIT.FluentSQL.Querying.Statements.Extensions +namespace FluentSQL.Querying.Statements.Extensions { /// /// Adds WHERE to a query. @@ -22,7 +22,7 @@ public static class WhereExtensions /// The Expression<Func<TTable, bool>> that indicates on /// which columns to join. /// - /// The . + /// The . public static Where Where( this QueryComponent queryComponent, Expression> expression) @@ -40,7 +40,7 @@ public static class WhereExtensions /// The Expression<Func<bool>> that indicates on /// which columns to join. /// - /// The . + /// The . public static Where Where( this QueryComponent queryComponent, Expression> expression) diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/From.cs b/src/FluentSQL/Querying/Statements/From.cs similarity index 89% rename from src/Weelink-IT.FluentSQL/Querying/Statements/From.cs rename to src/FluentSQL/Querying/Statements/From.cs index f16aab3..14eb409 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/From.cs +++ b/src/FluentSQL/Querying/Statements/From.cs @@ -1,7 +1,9 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +using FluentSQL.Modelling; + +namespace FluentSQL.Querying.Statements { /// /// The FROM-statement of a query. @@ -11,7 +13,7 @@ namespace WeelinkIT.FluentSQL.Querying.Statements /// /// The result type of the query. /// - /// The table where to select s from. + /// The table where to select s from. /// public class From : QueryComponent where TParameters : new() { diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/GroupBy.cs b/src/FluentSQL/Querying/Statements/GroupBy.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Statements/GroupBy.cs rename to src/FluentSQL/Querying/Statements/GroupBy.cs index c115fb4..6581a33 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/GroupBy.cs +++ b/src/FluentSQL/Querying/Statements/GroupBy.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The GROUP BY-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/InnerJoin.cs b/src/FluentSQL/Querying/Statements/InnerJoin.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/Statements/InnerJoin.cs rename to src/FluentSQL/Querying/Statements/InnerJoin.cs index a22a5a9..8c94d10 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/InnerJoin.cs +++ b/src/FluentSQL/Querying/Statements/InnerJoin.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The INNER JOIN-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Join.cs b/src/FluentSQL/Querying/Statements/Join.cs similarity index 98% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Join.cs rename to src/FluentSQL/Querying/Statements/Join.cs index a637b0d..889b6ab 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Join.cs +++ b/src/FluentSQL/Querying/Statements/Join.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// A JOIN-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/LeftJoin.cs b/src/FluentSQL/Querying/Statements/LeftJoin.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/Statements/LeftJoin.cs rename to src/FluentSQL/Querying/Statements/LeftJoin.cs index 3975249..73c64d8 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/LeftJoin.cs +++ b/src/FluentSQL/Querying/Statements/LeftJoin.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The LEFT JOIN-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Limit.cs b/src/FluentSQL/Querying/Statements/Limit.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Limit.cs rename to src/FluentSQL/Querying/Statements/Limit.cs index a377ec4..d34d042 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Limit.cs +++ b/src/FluentSQL/Querying/Statements/Limit.cs @@ -1,5 +1,5 @@  -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// Limits the number of results. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/OrderBy.cs b/src/FluentSQL/Querying/Statements/OrderBy.cs similarity index 97% rename from src/Weelink-IT.FluentSQL/Querying/Statements/OrderBy.cs rename to src/FluentSQL/Querying/Statements/OrderBy.cs index 2328689..a3d8168 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/OrderBy.cs +++ b/src/FluentSQL/Querying/Statements/OrderBy.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The ORDER BY-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/OuterJoin.cs b/src/FluentSQL/Querying/Statements/OuterJoin.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/Statements/OuterJoin.cs rename to src/FluentSQL/Querying/Statements/OuterJoin.cs index 9c99a28..847d5d3 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/OuterJoin.cs +++ b/src/FluentSQL/Querying/Statements/OuterJoin.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The OUTER JOIN-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/RightJoin.cs b/src/FluentSQL/Querying/Statements/RightJoin.cs similarity index 95% rename from src/Weelink-IT.FluentSQL/Querying/Statements/RightJoin.cs rename to src/FluentSQL/Querying/Statements/RightJoin.cs index 32e960a..49e1e9f 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/RightJoin.cs +++ b/src/FluentSQL/Querying/Statements/RightJoin.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The RIGHT JOIN-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Select.cs b/src/FluentSQL/Querying/Statements/Select.cs similarity index 98% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Select.cs rename to src/FluentSQL/Querying/Statements/Select.cs index 3570c15..aa2eed3 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Select.cs +++ b/src/FluentSQL/Querying/Statements/Select.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The SELECT-statement of a . diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Subquery.cs b/src/FluentSQL/Querying/Statements/Subquery.cs similarity index 97% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Subquery.cs rename to src/FluentSQL/Querying/Statements/Subquery.cs index 412fe0b..bebfd7e 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Subquery.cs +++ b/src/FluentSQL/Querying/Statements/Subquery.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// Represents a subquery to use in a different query. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Union.cs b/src/FluentSQL/Querying/Statements/Union.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Union.cs rename to src/FluentSQL/Querying/Statements/Union.cs index 6c62a20..433a66a 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Union.cs +++ b/src/FluentSQL/Querying/Statements/Union.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The UNION ALL-statement for combining two queries, filtering out duplicates. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/UnionAll.cs b/src/FluentSQL/Querying/Statements/UnionAll.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Statements/UnionAll.cs rename to src/FluentSQL/Querying/Statements/UnionAll.cs index e3647bb..47c1c0c 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/UnionAll.cs +++ b/src/FluentSQL/Querying/Statements/UnionAll.cs @@ -1,4 +1,4 @@ -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The UNION ALL-statement for combining two queries, allowing duplicates. diff --git a/src/Weelink-IT.FluentSQL/Querying/Statements/Where.cs b/src/FluentSQL/Querying/Statements/Where.cs similarity index 96% rename from src/Weelink-IT.FluentSQL/Querying/Statements/Where.cs rename to src/FluentSQL/Querying/Statements/Where.cs index 1326a15..57c6c6f 100644 --- a/src/Weelink-IT.FluentSQL/Querying/Statements/Where.cs +++ b/src/FluentSQL/Querying/Statements/Where.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace WeelinkIT.FluentSQL.Querying.Statements +namespace FluentSQL.Querying.Statements { /// /// The WHERE-statement of a query. diff --git a/src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs b/src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs deleted file mode 100644 index 10b0991..0000000 --- a/src/Weelink-IT.FluentSQL/Databases/SqlServer/SqlServerQueryCompiler.cs +++ /dev/null @@ -1,12 +0,0 @@ -using WeelinkIT.FluentSQL.Compilation; -using WeelinkIT.FluentSQL.Querying; - -namespace WeelinkIT.FluentSQL.Databases.SqlServer -{ - /// - /// Compiles a to a query for SQL Server. - /// - public class SqlServerQueryCompiler : QueryCompiler - { - } -} diff --git a/src/Weelink-IT.FluentSQL/Query.cs b/src/Weelink-IT.FluentSQL/Query.cs deleted file mode 100644 index 83c7f0e..0000000 --- a/src/Weelink-IT.FluentSQL/Query.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Data; -using System.Threading.Tasks; - -using WeelinkIT.FluentSQL.Databases; - -namespace WeelinkIT.FluentSQL -{ - /// - /// The compiled query to execute. - /// - /// The result type. - /// - /// The parameters required for executing this query. - /// - public class Query where TParameters : new() - { - /// - /// Create a new query that will be executed in . - /// - /// The database for this query. - /// The SQL to execute. - public Query(Database database, string commandText) - { - Database = database; - CommandText = commandText; - } - - /// - /// Execute this query and return the result. - /// - /// Configures the parameters. - /// The optional transaction. - /// The result of the query. - public Task ExecuteAsync(Action parameters, IDbTransaction transaction = null) - { - var p = new TParameters(); - parameters(p); - - return Database.QueryAsync(transaction, CommandText, p); - } - - private Database Database { get; } - private string CommandText { get; } - } - - /// - /// The compiled query to execute. - /// - /// The result type. - public class Query - { - /// - /// Create a new query that will be executed in . - /// - /// The database for this query. - /// The SQL to execute. - public Query(Database database, string commandText) - { - Database = database; - CommandText = commandText; - } - - /// - /// Execute this query and return the result. - /// - /// The optional transaction. - /// The result of the query. - public Task ExecuteAsync(IDbTransaction transaction = null) - { - return Database.QueryAsync(transaction, CommandText); - } - - private Database Database { get; } - private string CommandText { get; } - } -} diff --git a/src/docfx_project/docfx.json b/src/docfx_project/docfx.json index 7242c35..dd6b0f7 100644 --- a/src/docfx_project/docfx.json +++ b/src/docfx_project/docfx.json @@ -5,7 +5,7 @@ { "src": "../../", "files": [ - "src/Weelink-IT.FluentSQL/Weelink-IT.FluentSQL.csproj" + "src/FluentSQL/FluentSQL.csproj" ] } ],