-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6522 from bitfoundation/develop
Version 8.7.0 (#6519)
- Loading branch information
Showing
277 changed files
with
5,682 additions
and
1,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Demo/Bit.Besql.Demo/Offline-ClientDb.db* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Besql/Bit.Besql/wwwroot/browserCache.js → src/Besql/Bit.Besql/wwwroot/bit-besql.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/Besql/Demo/Bit.Besql.Demo.Client/Bit.Besql.Demo.Client.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile> | ||
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Bit.Besql\Bit.Besql.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
47 changes: 47 additions & 0 deletions
47
src/Besql/Demo/Bit.Besql.Demo.Client/Data/CompiledModel/OfflineDbContextModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// <auto-generated /> | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
|
||
#pragma warning disable 219, 612, 618 | ||
#nullable disable | ||
|
||
namespace Bit.Besql.Demo.Client.Data.CompiledModel | ||
{ | ||
[DbContext(typeof(OfflineDbContext))] | ||
public partial class OfflineDbContextModel : RuntimeModel | ||
{ | ||
private static readonly bool _useOldBehavior31751 = | ||
System.AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue31751", out var enabled31751) && enabled31751; | ||
|
||
static OfflineDbContextModel() | ||
{ | ||
var model = new OfflineDbContextModel(); | ||
|
||
if (_useOldBehavior31751) | ||
{ | ||
model.Initialize(); | ||
} | ||
else | ||
{ | ||
var thread = new System.Threading.Thread(RunInitialization, 10 * 1024 * 1024); | ||
thread.Start(); | ||
thread.Join(); | ||
|
||
void RunInitialization() | ||
{ | ||
model.Initialize(); | ||
} | ||
} | ||
|
||
model.Customize(); | ||
_instance = model; | ||
} | ||
|
||
private static OfflineDbContextModel _instance; | ||
public static IModel Instance => _instance; | ||
|
||
partial void Initialize(); | ||
|
||
partial void Customize(); | ||
} | ||
} |
96 changes: 96 additions & 0 deletions
96
src/Besql/Demo/Bit.Besql.Demo.Client/Data/CompiledModel/OfflineDbContextModelBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
// <auto-generated /> | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Metadata.Internal; | ||
|
||
#pragma warning disable 219, 612, 618 | ||
#nullable disable | ||
|
||
namespace Bit.Besql.Demo.Client.Data.CompiledModel | ||
{ | ||
public partial class OfflineDbContextModel | ||
{ | ||
partial void Initialize() | ||
{ | ||
var weatherForecast = WeatherForecastEntityType.Create(this); | ||
|
||
WeatherForecastEntityType.CreateAnnotations(weatherForecast); | ||
|
||
AddAnnotation("ProductVersion", "8.0.0"); | ||
AddRuntimeAnnotation("Relational:RelationalModel", CreateRelationalModel()); | ||
} | ||
|
||
private IRelationalModel CreateRelationalModel() | ||
{ | ||
var relationalModel = new RelationalModel(this); | ||
|
||
var weatherForecast = FindEntityType("Bit.Besql.Demo.Client.Model.WeatherForecast")!; | ||
|
||
var defaultTableMappings = new List<TableMappingBase<ColumnMappingBase>>(); | ||
weatherForecast.SetRuntimeAnnotation("Relational:DefaultMappings", defaultTableMappings); | ||
var bitBesqlSampleClientModelWeatherForecastTableBase = new TableBase("Bit.Besql.Demo.Client.Model.WeatherForecast", null, relationalModel); | ||
var dateColumnBase = new ColumnBase<ColumnMappingBase>("Date", "INTEGER", bitBesqlSampleClientModelWeatherForecastTableBase); | ||
bitBesqlSampleClientModelWeatherForecastTableBase.Columns.Add("Date", dateColumnBase); | ||
var idColumnBase = new ColumnBase<ColumnMappingBase>("Id", "INTEGER", bitBesqlSampleClientModelWeatherForecastTableBase); | ||
bitBesqlSampleClientModelWeatherForecastTableBase.Columns.Add("Id", idColumnBase); | ||
var summaryColumnBase = new ColumnBase<ColumnMappingBase>("Summary", "TEXT", bitBesqlSampleClientModelWeatherForecastTableBase) | ||
{ | ||
IsNullable = true | ||
}; | ||
bitBesqlSampleClientModelWeatherForecastTableBase.Columns.Add("Summary", summaryColumnBase); | ||
var temperatureCColumnBase = new ColumnBase<ColumnMappingBase>("TemperatureC", "INTEGER", bitBesqlSampleClientModelWeatherForecastTableBase); | ||
bitBesqlSampleClientModelWeatherForecastTableBase.Columns.Add("TemperatureC", temperatureCColumnBase); | ||
relationalModel.DefaultTables.Add("Bit.Besql.Demo.Client.Model.WeatherForecast", bitBesqlSampleClientModelWeatherForecastTableBase); | ||
var bitBesqlSampleClientModelWeatherForecastMappingBase = new TableMappingBase<ColumnMappingBase>(weatherForecast, bitBesqlSampleClientModelWeatherForecastTableBase, true); | ||
bitBesqlSampleClientModelWeatherForecastTableBase.AddTypeMapping(bitBesqlSampleClientModelWeatherForecastMappingBase, false); | ||
defaultTableMappings.Add(bitBesqlSampleClientModelWeatherForecastMappingBase); | ||
RelationalModel.CreateColumnMapping((ColumnBase<ColumnMappingBase>)idColumnBase, weatherForecast.FindProperty("Id")!, bitBesqlSampleClientModelWeatherForecastMappingBase); | ||
RelationalModel.CreateColumnMapping((ColumnBase<ColumnMappingBase>)dateColumnBase, weatherForecast.FindProperty("Date")!, bitBesqlSampleClientModelWeatherForecastMappingBase); | ||
RelationalModel.CreateColumnMapping((ColumnBase<ColumnMappingBase>)summaryColumnBase, weatherForecast.FindProperty("Summary")!, bitBesqlSampleClientModelWeatherForecastMappingBase); | ||
RelationalModel.CreateColumnMapping((ColumnBase<ColumnMappingBase>)temperatureCColumnBase, weatherForecast.FindProperty("TemperatureC")!, bitBesqlSampleClientModelWeatherForecastMappingBase); | ||
|
||
var tableMappings = new List<TableMapping>(); | ||
weatherForecast.SetRuntimeAnnotation("Relational:TableMappings", tableMappings); | ||
var weatherForecastsTable = new Table("WeatherForecasts", null, relationalModel); | ||
var idColumn = new Column("Id", "INTEGER", weatherForecastsTable); | ||
weatherForecastsTable.Columns.Add("Id", idColumn); | ||
var dateColumn = new Column("Date", "INTEGER", weatherForecastsTable); | ||
weatherForecastsTable.Columns.Add("Date", dateColumn); | ||
var summaryColumn = new Column("Summary", "TEXT", weatherForecastsTable) | ||
{ | ||
IsNullable = true | ||
}; | ||
weatherForecastsTable.Columns.Add("Summary", summaryColumn); | ||
var temperatureCColumn = new Column("TemperatureC", "INTEGER", weatherForecastsTable); | ||
weatherForecastsTable.Columns.Add("TemperatureC", temperatureCColumn); | ||
var pK_WeatherForecasts = new UniqueConstraint("PK_WeatherForecasts", weatherForecastsTable, new[] { idColumn }); | ||
weatherForecastsTable.PrimaryKey = pK_WeatherForecasts; | ||
var pK_WeatherForecastsUc = RelationalModel.GetKey(this, | ||
"Bit.Besql.Demo.Client.Model.WeatherForecast", | ||
new[] { "Id" }); | ||
pK_WeatherForecasts.MappedKeys.Add(pK_WeatherForecastsUc); | ||
RelationalModel.GetOrCreateUniqueConstraints(pK_WeatherForecastsUc).Add(pK_WeatherForecasts); | ||
weatherForecastsTable.UniqueConstraints.Add("PK_WeatherForecasts", pK_WeatherForecasts); | ||
var iX_WeatherForecasts_TemperatureC = new TableIndex( | ||
"IX_WeatherForecasts_TemperatureC", weatherForecastsTable, new[] { temperatureCColumn }, false); | ||
var iX_WeatherForecasts_TemperatureCIx = RelationalModel.GetIndex(this, | ||
"Bit.Besql.Demo.Client.Model.WeatherForecast", | ||
new[] { "TemperatureC" }); | ||
iX_WeatherForecasts_TemperatureC.MappedIndexes.Add(iX_WeatherForecasts_TemperatureCIx); | ||
RelationalModel.GetOrCreateTableIndexes(iX_WeatherForecasts_TemperatureCIx).Add(iX_WeatherForecasts_TemperatureC); | ||
weatherForecastsTable.Indexes.Add("IX_WeatherForecasts_TemperatureC", iX_WeatherForecasts_TemperatureC); | ||
relationalModel.Tables.Add(("WeatherForecasts", null), weatherForecastsTable); | ||
var weatherForecastsTableMapping = new TableMapping(weatherForecast, weatherForecastsTable, true); | ||
weatherForecastsTable.AddTypeMapping(weatherForecastsTableMapping, false); | ||
tableMappings.Add(weatherForecastsTableMapping); | ||
RelationalModel.CreateColumnMapping(idColumn, weatherForecast.FindProperty("Id")!, weatherForecastsTableMapping); | ||
RelationalModel.CreateColumnMapping(dateColumn, weatherForecast.FindProperty("Date")!, weatherForecastsTableMapping); | ||
RelationalModel.CreateColumnMapping(summaryColumn, weatherForecast.FindProperty("Summary")!, weatherForecastsTableMapping); | ||
RelationalModel.CreateColumnMapping(temperatureCColumn, weatherForecast.FindProperty("TemperatureC")!, weatherForecastsTableMapping); | ||
return relationalModel.MakeReadOnly(); | ||
} | ||
} | ||
} |
Oops, something went wrong.