Christopher Jolly
2230f06f13
With InlineTopParameters it didn't handle the case of a sum of two constant valuees
2 years ago
Christopher Jolly
a93c205194
When using FromSql, parameters can end up named without the @ at the beginning. This leads to the failure to match it to the Sql where the string is generated with the @.
...
If we can't find the parameter using the normal name, try to pick it up when excluding the @
2 years ago
Christopher Jolly
5e32650f6d
Dispose of any new JetCommands created when splitting commands properly. This were not being disposed of and still holding a link to the database thereby preventing some file access e.g. Deleting a file
2 years ago
Christopher Jolly
429c67ca3a
Some skip...take optimization and fix using multiple take after a skip
3 years ago
Christopher Jolly
8c9dff5d36
Initial support for Skip....Take. Take...Skip and Skip currently do not work properly
3 years ago
Cédric Luthi
cbb3f94440
Remove unnecessary references in `EntityFrameworkCore.Jet.Data`
...
Now that `EntityFrameworkCore.Jet.Data` targets `net6.0` those references are not required anymore.
Note that the `Microsoft.Win32.Registry` package reference was the root cause of the failure to publish the `EntityFrameworkCore.Jet.Data` 7.0.0 package because of [warning NU5104][1] (treated as error):
> A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency "Microsoft.Win32.Registry [6.0.0-preview.5.21301.5, )" or update the version field in the nuspec.
[1]: https://bubibubi.visualstudio.com/EntityFrameworkCore.Jet/_build/results?buildId=280&view=logs&j=67ea8d94-b5a7-504b-2d4b-07baddfad3f1&t=1e07b7f6-b7a1-55f6-9cca-c04683790a41&l=37
3 years ago
Cédric Luthi
83c29e4c43
Introduce a new typed JetConnectionStringBuilder
...
This makes it easier to use than the extensions (EntityFrameworkCore.Jet.Data.DbConnectionStringBuilderExtensions) with Get/Set methods.
With the new `JetConnectionStringBuilder` class:
```csharp
var csb = new JetConnectionStringBuilder(DataAccessProviderType.OleDb)
{
Provider = "Microsoft.ACE.OLEDB.12.0",
DataSource = @"C:\myFolder\myAccessFile.accdb",
DatabasePassword = "hunter2",
};
var connectionString = csb.ConnectionString;
```
Without the new `JetConnectionStringBuilder` class:
```csharp
var csb = new OleDbConnectionStringBuilder();
csb.SetProvider("Microsoft.ACE.OLEDB.12.0");
csb.SetDataSource(@"C:\myFolder\myAccessFile.accdb");
csb.SetDatabasePassword("hunter2");
var connectionString = csb.ConnectionString;
```
3 years ago
Cédric Luthi
c795ce6228
Make EntityFrameworkCore.Jet available on `net6.0`
...
By using `[SupportedOSPlatform("windows")]` at assembly level instead of targeting `net6.0-windows`.
This will enable taking a dependency on the EntityFrameworkCore.Jet* NuGet packages on Linux and macOS. The consumer of EntityFrameworkCore.Jet can then decide how to handle [CA1416][1] either by adding `[SupportedOSPlatform("windows")]`, by targeting `net6.0-windows` or by testing `OperatingSystem.IsWindows()` at runtime.
[1]: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1416
3 years ago
Christopher Jolly
9489bc4564
Jet seems to output bytes only as an array. so a single byte becomes a byte[1] array. Return the first byte of that array in this instance
3 years ago
Christopher Jolly
d7033125be
Properly read a TimeSpan value from the database.
...
Add member translator for timespan so SQL works
3 years ago
Christopher Jolly
458197e582
Pass the current dataaccessproviderfactory type to CreateDatabase. Preference will take place using this type before going to the default in case it can't find the type via the connection string.
...
Fixes #135 and #122
3 years ago
Christopher Jolly
9464868c1d
Reverse the order of the indices. We need to work backwards on the string to keep the indices correct
3 years ago
Christopher Jolly
cef810999d
Fix failed merge
3 years ago
Christopher Jolly
5ea5fdc446
Merge branch 'master' into ef7
3 years ago
Christopher Jolly
a9789216d2
Dual table: Auto detect the dual table name on model load. Use that table for any queries.
...
Also allow a custom override name to be set
3 years ago
Christopher Jolly
44aea7795b
Dual table: Auto detect the dual table name on model load. Use that table for any queries.
...
Also allow a custom override name to be set
3 years ago
Christopher Jolly
710376d50f
Enable nullable on src projects (not tests)
...
Fix Math and String translator to add missing translations and make it similar to how sql server generates
Update lots of tests
3 years ago
Christopher Jolly
fc6b407b36
Update version info for message for required OleDb and Odbc dependencies
3 years ago
Christopher Jolly
ae21d832f1
Fix getting the schema for relations. Need both adox and DAO to get all fields
3 years ago
Christopher Jolly
093890fa66
[Fix]: Don't update the command to the trim'd version. If using an interceptor, it has already gotten the original commandText. Any comparisons between the actual result and the interceptor would fail
3 years ago
Christopher Jolly
ee87572b2e
Fix schema query: the ondelete and onupdate were added in the wrong order
3 years ago
Christopher Jolly
1f35ab88fd
merge fixes from upstream
3 years ago
Laurents Meyer
6a8ccd27de
Fix transactions issues ( #129 )
...
* Fix active transaction support and disposed handling.
* Add transaction baseline tests.
* Fix transaction tests.
4 years ago
Laurents Meyer
1eb7ec7793
Fix EXIST handling in regards to line breaks. ( #117 ) ( #118 )
4 years ago
Christopher Jolly
426240084d
net 6 update
4 years ago
Christopher Jolly
b1fa143d4d
Update to .Net 5 ( #99 )
...
* update to net 5
* Add DecimalTypeKey to the logger
* fix build
* fix sdk version for script
* Update dependencies.
* Fix version and dependencies.
* Readd necessary code paths, fix smaller upgrade issues, cleanup code.
* Fix project files.
* Fix tests.
* Readd removed JetQueryTranslationPostprocessorFactory injection.
Fix date/time related millisecond (double) support.
* Fix value generation.
Co-authored-by: Laurents Meyer <laucomm@gmail.com>
4 years ago
Laurents Meyer
c09660785d
Fix ArgumentNullException when creating a database. ( #107 )
4 years ago
Laurents Meyer
12614cd7a1
Ensure columns of relationships (FK -> PK/AK) are applied in the original order, when scaffolding. ( #104 )
5 years ago
Laurents Meyer
fedc4cc226
Fix create database operations and multi statement splitting with parameters ( #97 )
...
* Fix automatically assigned file extensions when creating databases.
* Fix parser to correctly return state indices of sub commands. This is a fix for commands containing more than one actual SQL command in its command text, when those multiple actual SQL commands are using parameters.
5 years ago
Laurents Meyer
3595734d47
Fix remaining EFCore.Jet.Data tests ( #92 )
...
* Refactor dual table handling.
* Fix remaining EFCore.Jet.Data tests.
5 years ago
Laurents Meyer
b749447fd0
Add support for PASSWORD clause in EFCore.Jet specific CREATE DATABASE statement ( #91 )
...
* Add support for PASSWORD clause in EFCore.Jet specific CREATE DATABASE statement.
* Add negative test.
5 years ago
Laurents Meyer
45dcfbe0dd
When creating databases, automatically use the latest database version that is supported by the current file extension. ( #90 )
5 years ago
Laurents Meyer
56bf71b17f
Fix schema and rename related issues and tests ( #89 )
...
* Fix schema and rename related issues and tests.
* Adjust rename syntax for better standard conformity.
5 years ago
Laurents Meyer
45e7d8a365
Fix CREATE/DROP DATABASE related issues. ( #88 )
5 years ago
Laurents Meyer
00178eb0cd
Fix DateTime fractions logic and make milliseconds support opt-in ( #86 )
...
* Ensure deterministic test ordering.
* Fix DateTime factions logic.
* Make milliseconds support opt-in.
* Fix logic and add tests.
* Fix DateTime related OLE DB parameter configuration.
5 years ago
Laurents Meyer
1df41e8b43
Fix JetCommand regarding CREATE PROCEDURE statements and command splitting. ( #87 )
5 years ago
Laurents Meyer
54b4af5759
Fix DateTime expressions for HasDefaultValue() and add support for fractions of a second ( #85 )
...
* Fix and improve test runs.
* Fix DateTime expressions for HasDefaultValue() and add support for fractions of a second.
Refactor test infrastructure.
5 years ago
Laurents Meyer
c473442c8d
Fix runtime checks for appropriate data access library version. ( #84 )
5 years ago
Laurents Meyer
f094f3658c
Fix data and test infrastructure and scaffolding ( #82 )
...
* Fix local references.
* Optimize, fix and simplify JetDataReader.
* Only scaffold objects if tables are available.
* Fix test infrastructure.
* Ignore Development.props in root folder.
5 years ago
Laurents Meyer
2b44bac7ba
Cleanup solution.
5 years ago
Laurents Meyer
c5905a77ed
Fix assembly name.
5 years ago
Laurents Meyer
56c347348f
Fix packaging.
5 years ago
Laurents Meyer
64ebb61c0a
Rename System.Data.Jet to EntityFrameworkCore.Jet.Data ( #75 )
...
* Rename System.Data.Jet and System.Data.Jet.Test projects.
* Rename System.Data.Jet and System.Data.Jet.Test namespaces.
5 years ago