Skip to content

8.0.0

Latest
Compare
Choose a tag to compare
@ChrisJollyAU ChrisJollyAU released this 05 Jul 17:51
df1ea3c

The RTM of EFCore.Jet 8 is now out.

Key features/Improvements

  • Updated to EF Core 8. Requires EF Core 8. Currently this requires .Net 8 to run
  • Add support for DateOnly/TimeOnly
  • Very limited computed column support. If the computed column value is a simple constant, we can rewrite it to the default value of the column
  • Add support for the Math Degrees to Radions and Radians to Degrees. Done by first principle as no inbuilt SQL function
  • Very limited support for primitive collections and Json types. The support is only for reading/writing the whole value at once. Querying into it for a specific element is not supported.
  • Option to ignore MSys (system) tables when scaffolding. Add IgnoreMsys=YES; to the connection string

Notable bug fixes

  • Fix DateTimeOffset
    • 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
  • Better support for byte arrays (#228). Most functions work now when working on byte arrays except for getting its length. Due to Jet treating it all as unicode strings, the default length function will return the length as multiples of 2. There is a workaround that will work in most cases. Please use the specific EF Function instead: EF.Functions.ByteArrayLength
  • Workaround for ValuesExpression (#222). The VALUES clause was able to generate a constant table (and with multiple rows). Use a work around with a SELECT for each row combined with a UNION
  • QueryableMethodTranslatingExpressionVisitor: TranslateElementAtOrDefault we do not throw on this. Was thought to be Json related at one point but this is actually for translating the Linq ElementAt. Basically does a Skip(x).Take(1)
  • The static Guid.NewGuid is translated client side as there is no equivalent function in Jet
  • The default C# DateTime (0001-01-01 00:00L:00) is mapped to the 0 value for Jet (30/12/1899 00:00:00)
  • TPC Mapping: EF Core requires all entities in a hierarchy to have a unique value. This is normally set up via sequences in the databases that support it. For those that don't (Sqlite and Jet) the OnAdd value generated strategy is turned to have the Id just a normal integer. The client needs to handle keeping the id's unique. Everything else works
  • Add more support for UPDATE and DELETE queries, especially with those referencing multiple tables and joins
  • Multiple fixes with UNION queries where we had NULL constant values in the SQL being unioned against numeric columns.. This either gave a data type mismatch or produced weird results (such as a binary type value within a string type output instead of a numerical output). Casting the NULL constant to a variant generally fixed it
  • When generating sets (UNION, INTERSECT) it didn't get to the part where it generated the SQL for the Alias
  • When translating IndexOf, it used the INSTR Sql method. According to the docs the first parameter is the start index and is optional but found some tests that didn't like that. Including all parameters fixed that

For more detail see the notes for each of the pre-release versions