Skip to content

Releases: CirrusRedOrg/EntityFrameworkCore.Jet

8.0.0-rc.1

30 Mar 22:46
4dda3e4
Compare
Choose a tag to compare
8.0.0-rc.1 Pre-release
Pre-release

RC 1 is out now

Bug fixes

  • Test fixes
  • DateTimeOffset: UtcNow passes in the offset from utc acquired in the client so that it can convert Now() to utc
  • Option to ignore MSys (system) tables when scaffolding. Add IgnoreMsys=YES; to the connection string
  • 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
  • Use the correct precision in string literal for double (15) and float (7). This matches how they are saved. If passed in with more precision when reading back the saved value, they would not be equal
  • Keys are allowed to be case-insensitive (same as sql server). Add a Case Insenstive comparer to the JetStringTypeMapping
  • Parameter name was the same when multiple contains/startswith/endswith was used. Hence one of them did not use the correct pattern. See also issue 32432 in efcore
  • 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

8.0.0-beta.1

11 Feb 15:49
0a79a23
Compare
Choose a tag to compare
8.0.0-beta.1 Pre-release
Pre-release

Beta 1 is now out.

This is compatible is dependent on at least 8.0.1 of EF Core and only runs on .Net 8

New features

  • Add back in the SkipTake Collapsing feature. We can simplify if the Limit is known to be a 0

Bug fixes

  • Tests: Remove unsupported tests
  • Tests: More test fixes
  • When using the option to use short strings as default is set, the length value (via attribute or fluent api) was ignored when it was over 255. Upgrade the value to a long char in that case
  • Fix Any,All,Contains with Many to Many relationships within a Where clause. Some queries have a SELECT 1 inside a WHERE NOT EXISTS clause which doesn't work. Having a column in the projection works
  • When generating the update sql, the command to fetch the number of affected rows needs the ResultSetMapping.ResultSetWithRowsAffectedOnly value set as well
  • Retrying Execution Strategy: Check the exception.HResult as well. Our test classes can't exactly mimic the exact way and put in into the Errors list
  • Handle some more NULL constant in projection Jet quirks
  • GetByte also needs hardening to handle some potential cases when the result is of type string
  • Handle Skip...Take in its own post processor.
  • Test Utilities: Improve the execution of a setup script
  • Handle the find and throw of a split query with offset and not order by in our own SkipTake postprocessor rather than its own postprocessor
  • DateTime.Today was not translated properly. It is a static member and not under an instance as originally expected
  • 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 to have the Id just a normal integer. The client needs to handle keeping the id's unique. Everything else works
  • Expand the JetOrderByPostProcessor to be more general and de-duplicate more clauses in the ORDER BY and projection

8.0.0-alpha.2

12 Dec 12:21
b2998a4
Compare
Choose a tag to compare
8.0.0-alpha.2 Pre-release
Pre-release

Alpha 2 is now out.

This is compatible with the RTM version of EF Core 8 and only runs on .Net 8

New features

  • 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.

Bug fixes

  • 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
  • Some string related functions can not accept NULL values for certain arguments. Added protections against those
  • Test updates
  • Jet does not support having subqueries in the order by clause. Lift these into into the table above so it has its own column that it can reference
  • Added in a couple of extra expected warnings to match what the tests expect
  • Tag lines and comments are removed from the SQL before executing
  • Fixed the OnDelete convention
  • Add more support for UPDATE and DELETE queries, especially with those referencing multiple tables and joins
  • 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

8.0.0-alpha.1

25 Sep 18:08
Compare
Choose a tag to compare
8.0.0-alpha.1 Pre-release
Pre-release

With the release of .Net RC 1 and EF Core 8 it is time to start work on a compatible version of EFCore.Jet

Alpha 1 is now out and available for testing. Most things should be working and I don't believe there is any significant regressions from v7

Some notable changes are:

Updated to .Net 8. Note that EFCore requires .Net 8 and is not able to run on a lower version
Updated tests to match. Generally along the lines of different optimizations applied
Uses the new way of doing StartwWith/EndsWith/Contains
Previously used to get a substring the length of the searched for string and compared on that. Now translates into a LIKE pattern
Fix formatting of a single byte in the SQL string literal
Using DISTINCT in the same select as TOP in Jet is mutually exclusive. Hence push the SELECT TOP statement into a subquery
Fix handling some versions of our generated SELECT TOP statement when it had the sum of 2 numeric constants
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
There is still some work to go but some new EF Core 8 features do work. Some notes:

Complex types do work
DateOnly/TimeOnly still need to be implemented
Json support is obviously not working (Jet has no concept). Might be doable to handle this within EFCore.Jet by having the column has a text/memo with the full Json, the select/update statements read/write the full json but within EFCore.Jet we process it to return the required portion (or update).

7.0.3

25 Sep 18:09
Compare
Choose a tag to compare

7.0.2

03 Jul 17:24
Compare
Choose a tag to compare

Minor update

  • Changed some Fluent API methods: UseIdentityColumn(s) -> UseJetIdentityColumn(s) . This is needed so that we don't hit an ambiguous method when referencing Sql Server which has the name API extension

7.0.0

02 Jul 15:38
Compare
Choose a tag to compare

v7 RTM is out!!

Improvements:

  • Library now targets net6.0 instead of net6.0-windows . While it still uses a lot of Windows functionality (DAO,ADOX,OleDb) this change allows you to reference it in another multi-platform package and only expose the EFCore.Jet functionality if running on Windows. Thanks @0xced
  • Handle a left join that is immediately preceded by a cross join (otherwise known as cartesian product/join). For Jet the cross join needs to be pushed down into its own subquery before doing the left join
  • Changed some handling of the Jet conversion functions CDbl, CInt, Clng etc. These functions do not accept NULL values (unlike SQL Server CAST), thus the inside expression needs to be NULL checked. Included some exceptions if we can pick up that the inside function will never produce a NULL then we can simplify and do without the NULL check.
  • More test fixes

7.0.0-rc.1

03 May 17:48
Compare
Choose a tag to compare
7.0.0-rc.1 Pre-release
Pre-release

This prerelease is compatible with .NET 6 and .NET 7, EF Core 7.0.0+, System.Data.Odbc 7.0.0 and System.Data.OleDb 7.0.0.

Improvements:

  • Generate the correct SQL literal for GUID (with the curly braces)
  • Change the way ordering works with boolean types. Jet uses -1 for true and 0 for false. Previous behaviour changed whether that column was ordered ascending or descending. While that worked, if you had null values in amongst it the specific placements of those wasn't matching the expected. Keeping the original ASC or DESC but ordering by the NOT value of the boolean works better
  • Fixed escaping wild chars in a string literal when used with a pattern (using the LIKE clause so calls such as Contains, StartsWith,EndsWith)
  • Fix the GetValueGenerated function in the JetValueGeneratorConvention: Function arguments needed to be updated to the current EF Core. Now sets the ValueGenerated.OnAdd annotation for the identity
  • Remove sbyte from the clr Type Mappings. EF Core has inbuilt type conversions for types which includes sbyte,ushort,uint etc. These types can be mapped with the conversions (EF Core just upgrades to the next numeric type so sbyte is mapped to Int16). The set up for sbyte here was close but lacked the correct comparer/converter so at times when we were working with sbyte it was trying to compare with Int16. Using the inbuilt conversions EF Core sets that up automatically. This is the same behaviour in EFCore.SqlServer
  • CAST: Used to throw an error if there was a cast that couldn't be handled be the cast functions (CStr, CLng, CInt, CDate etc). Given that not everything is handled by that (e.g. no function to cast to GUID), we just ignore the cast and include the value/column directly. The way Jet/Ace operates it seems more flexible (especially when a number of the functions/operators take various column types including variants)
  • Indexes: Add a index convention to add a filter to filter out null values for unique indexes
  • Convention Set Builder: Updates to current EF Core style
  • Fixed some clr type issues when mapping store type of text. Make sure the clr type of the incoming type info is the same as the type mapping we return. Already had that check when dealing with System.String but not when dealing with store type text
  • Decimal types have a maximum precision of 20 and not 38 (Jet/Ace/MS Access limitation)
  • NEW OPTION: When configuring the Jet options there is a new option UseShortTextForSystemString. Current behaviour has been mapping System.String properties (given they have no size specificed) to an unbounded string and as such is mapped to a longtext/memo (SQL Server uses nvarchar(max) ). Jet as some problems with memo types in that you can't do a join on those columns and ordering can have problems. Set this option to map it to use the normal short text column type. Note that the short text has a maximum size of 255! This option is NOT enabled by default so nothing changes for those with current usage unless they specifically enable it

7.0.0-beta.1

03 May 17:48
Compare
Choose a tag to compare
7.0.0-beta.1 Pre-release
Pre-release

This prerelease is compatible with .NET 6 and .NET 7, EF Core 7.0.0+, System.Data.Odbc 7.0.0 and System.Data.OleDb 7.0.0.

Improvements:

  • Unrolled COALESCE with 3 or more arguments
  • Finally got the Gears of War tests working (needed a data change to get passed a rather strict foreign key set up)
  • Fixed the Object ToString translator to not handle some things on the server (like enums)
  • Fixed the Convert translator - was picking up a tostring method that required parameters whereas the server was only meant to handle the ones without parameters (often the parameters were a format string or format provider)
  • Fixed some null propagatability in LEN and MID functions (specially MID does not accept NULL for length parameter whereas SQL Server does)
  • Fixed reading TimeSpan from the database

7.0.0-alpha.2

01 Apr 14:58
Compare
Choose a tag to compare
7.0.0-alpha.2 Pre-release
Pre-release

This prerelease is compatible with .NET 6 and .NET 7, EF Core 7.0.0+, System.Data.Odbc 7.0.0 and System.Data.OleDb 7.0.0.

Notable improvements are:

  • Fixed replacing global variable placeholders
  • Added JetParameterBaseSqlProcessor and JetSqlNullabilityProcessor. Fixesthe order of how it optimizes nullable values
  • CreateDatabase now tries to use the current provider type instead of defaulting to Odbc
  • Add Floor and Ceiling to Math translations
  • A huge amount of tests were fixed