Commit Graph

72 Commits (e3c843522018b4f3e7ea3fb0f374a050812bc357)

Author SHA1 Message Date
Christopher Jolly 1069897167
Update to sync to latest EF 9 (#276)
* Small fixes

* some smaller fixes to bring up to date to ef 9

* change version to rtm
8 months ago
Christopher Jolly dd24f9a674
Code style cleanup (#271)
* Code cleanup and code style enhancement

* Oops

* Fix default provider type

* fix error

* Throw better error if GetMostRecentCompatibleProviders doesn't find anything
1 year ago
Christopher Jolly 8033475032
Sync to an RC2 build (#265)
* RC2 History Repo

* return the right ValueGenerated if it is mapped to json

* Since Jet doesn't do anything for GO we don't need to do anything like Sql server does

* Update the HistoryRepository

* Remove unused tests

* [GitHub Actions] Update green tests.

---------

Co-authored-by: github-actions <github-actions@github.com>
1 year ago
Christopher Jolly 5fece6dd96
Cleanup (#261)
* Use primary constructors
Remove 2 obsolete tests

* fix build

* [GitHub Actions] Update green tests.

---------

Co-authored-by: github-actions <github-actions@github.com>
1 year ago
Christopher Jolly 48dadc2f5d Add Migration Lock feature in 1 year ago
Christopher Jolly a2a4d5c20c For returning TimeSpan and TimeOnly we don't want to convert the Jet default datetime to the c# 0 1 year ago
Christopher Jolly 8ab1767b37 More fixes 1 year ago
Christopher Jolly ba02f1cfbd more test updates 1 year ago
Christopher Jolly 45bae420e2 Initial ef9 update. Mostly just getting the files to compile with all the ef9 changes 1 year ago
Christopher Jolly c51b182962
AdoX GetRelations returns all key types not just foreign keys (#245)
* GetRelations only needs to return rows for foreign keys and not unique or primary keys. This makes it match DAO
2 years ago
Christopher Jolly 6ad608581b
Fix DateTimeOffset Now and UtcNow (#235)
* Fix DateTimeOffset Now and UtcNow
2 years ago
Christopher Jolly d8d47443f0
Add option to ignore msys tables when scaffolding (#236)
* Add option to ignore msys tables when scaffolding
2 years ago
Christopher Jolly 2e4782677b
change the min required version of oledb and odbc to 8.0.0 (#232) 2 years ago
Christopher Jolly 7fb522e90f
Move the SkipTake to its own processor (#206)
* Move the SkipTake to its own processor

This handles the queries with Offset and Limit better as there are other linq methods that manage to set the Limit (e.g. First)
2 years ago
Christopher Jolly 3f6cc90f8f Handle another Jet UNION quirk with NULL values. A string value could be returned when the store and expected type is a byte 2 years ago
Christopher Jolly 12bbf0470f
Reintroduce the SkipTakeCollapsingExpressionVisitor (#200) 2 years ago
Christopher Jolly df7b86ac96
Misc test fixes (#196) 2 years ago
Christopher Jolly 7b6ee168e2
Properly read and write UTC values for DateTimeOffset (#188)
MS Access does not have a DateTimeOffset data type so the value should be converted to UTC and saved as a normal date/time

This fixes 2 things

Regression in 7.0 series where the DateTimeOffset was being written as Local time and not UTC.
When reading the value and converting from a DateTime, the Offset value ended up being implicitly set to the systems local time zone offset. A DateTimeOffset from a UTC value should actually have an offset of 0. This has been wrong since the 2.2 series
2 years ago
Christopher Jolly 21b07705ce Return empty list for state indices when having parsed an empty string 2 years ago
Christopher Jolly 6fe74929cf Remove tag lines/comments from the sql to be executed 2 years ago
Christopher Jolly 7caea4dcdb
Provide a valid count argument to LEFT,RIGHT,MID (#172)
* Coalesce the result of LEN on a string to 0 when within a LEFT/RIGHT/MID function as it cannot take NULL for the count of characters
2 years ago
Christopher Jolly d9f2c8eb2c
Interception tests (#171)
* Allow unconfigured dataaccessproviderfactory and null connection string

* [GitHub Actions] Update green tests.

---------
2 years ago
Christopher Jolly 6ccebae028
Db model factory updates (#166) 2 years ago
Laurents Meyer ca8472c96e Fix ExecuteNonQuery() return value logic to be case sensitivity proof. 2 years ago
Christopher Jolly 67f98ee8ac More test updates 2 years ago
Laurents Meyer f086526d02
Fix and update dependencies and project files. (#144) 2 years ago
Christopher Jolly a6d9058c05 Some date and time updates
- Don't derive Timespan and DateTimeOffset type mapping from our JetDateTimeTypeMapping. We can derive from the normal base class for those types
- DateTimeOffset is now mapped to a string. This allows us to round-trip all the details, however any calculations or queries for any components do not work
2 years ago
Christopher Jolly c1d263aedc Initial support for DateOnly/TimeOnly 2 years ago
Christopher Jolly ba913012ce The default value for DateTime in Jet is 30/12/1899 . When we save if we get a 1/1/001 we translate to this value. When reading we need to do the reverse translation 2 years ago
Christopher Jolly 3191ca6851 Fix some conversion errors when getting a numeric value. See detailed notes in the GetInt32 function 2 years ago
Christopher Jolly 34f124c0f8 Update to .Net 8 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