Skip to content

Commit

Permalink
Version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
NTDLS committed Aug 6, 2024
1 parent d277e61 commit 74af9d9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
4 changes: 2 additions & 2 deletions @Installers/Setup.Iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Setup]
;-- Main Setup Information
AppName = Katzebase Server
AppVerName = Katzebase Server 0.12.0
AppVerName = Katzebase Server 0.13.0
AppCopyright = Copyright © 2024 NetworkDLS.
DefaultDirName = {commonpf}\NetworkDLS\Katzebase\Server
DefaultGroupName = NetworkDLS\Katzebase
Expand All @@ -17,7 +17,7 @@
AppPublisher = NetworkDLS
AppPublisherURL = http://www.NetworkDLS.com/
AppUpdatesURL = http://www.NetworkDLS.com/
AppVersion = 0.12.0
AppVersion = 0.13.0

[Files]
Source: "..\NTDLS.Katzebase.Server\bin\Release\net8.0\runtimes\*.*"; DestDir: "{app}\runtimes"; Flags: IgnoreVersion recursesubdirs;
Expand Down
2 changes: 1 addition & 1 deletion NTDLS.Katzebase.Engine/NTDLS.Katzebase.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<Company>NetworkDLS</Company>
<Copyright>Copyright © 2024 NetworkDLS</Copyright>
<Version>0.12.0.0</Version>
<Version>0.13.0</Version>
<Authors>NetworkDLS</Authors>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using static NTDLS.Katzebase.Client.KbConstants;
using static NTDLS.Katzebase.Engine.Documents.DocumentPointer;
using static NTDLS.Katzebase.Engine.Library.EngineConstants;
using static NTDLS.Katzebase.Engine.Sessions.SessionState;
using static NTDLS.Katzebase.Engine.Trace.PerformanceTrace;

namespace NTDLS.Katzebase.Engine.Query.Searchers
Expand All @@ -36,7 +37,7 @@ internal static DocumentLookupResults GetDocumentsByConditions(EngineCore core,
IEnumerable<DocumentPointer>? documentPointers = null;
ExpressionOptimization? lookupOptimization = null;

bool explain = transaction.Session.GetConnectionSetting(SessionState.KbConnectionSetting.ExplainQuery) == 1;
bool explain = transaction.Session.IsConnectionSettingSet(KbConnectionSetting.ExplainQuery);

//TODO: Here we should evaluate whatever conditions we can to early eliminate the top level document scans.
//If we don't have any conditions then we just need to return all rows from the schema.
Expand All @@ -45,12 +46,16 @@ internal static DocumentLookupResults GetDocumentsByConditions(EngineCore core,
lookupOptimization = ExpressionOptimization.Build(
core, transaction, topLevelMap.PhysicalSchema, query.Conditions, topLevelMap.Prefix);

#region Explain.

if (explain)
{
var friendlyExpression = lookupOptimization.BuildFullVirtualExpression();
transaction.AddMessage(friendlyExpression, KbMessageType.Explain);
}

#endregion

var limitedDocumentPointers = new List<DocumentPointer>();

if (lookupOptimization.CanApplyIndexing())
Expand Down Expand Up @@ -430,7 +435,9 @@ private static void IntersectAllSchemasRecursive(DocumentLookupThreadInstance in

#region Indexing to reduce the number of document pointers in "limitedDocumentPointers".

bool explain = instance.Operation.Transaction.Session.GetConnectionSetting(SessionState.KbConnectionSetting.ExplainQuery) == 1;
#region Explain.

bool explain = instance.Operation.Transaction.Session.IsConnectionSettingSet(KbConnectionSetting.ExplainQuery);

if (explain && currentSchemaMap.Optimization != null)
{
Expand All @@ -453,6 +460,8 @@ private static void IntersectAllSchemasRecursive(DocumentLookupThreadInstance in
}
}

#endregion

if (currentSchemaMap.Optimization?.CanApplyIndexing() == true)
{
//We are going to create a limited document catalog from the indexes. So kill the reference and create an empty list.
Expand Down
11 changes: 11 additions & 0 deletions NTDLS.Katzebase.Engine/Sessions/SessionState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,18 @@ public KbNameValuePair<KbConnectionSetting, double> UpsertConnectionSetting(KbCo
return result;
}

/// <summary>
/// Shortcut to determine if a value is set to 1 (boolean true).
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public bool IsConnectionSettingSet(KbConnectionSetting name)
{
var result = Variables.FirstOrDefault(o => o.Name == name);
return result?.Value == 1;
}

public bool IsConnectionSettingPresent(KbConnectionSetting name)
{
var result = Variables.FirstOrDefault(o => o.Name == name);
return result != null;
Expand Down
2 changes: 1 addition & 1 deletion NTDLS.Katzebase.Server/NTDLS.Katzebase.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Company>NetworkDLS</Company>
<Copyright>Copyright © 2024 NetworkDLS</Copyright>
<Version>0.12.0.0</Version>
<Version>0.13.0</Version>
<Authors>NetworkDLS</Authors>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<OutputType>Exe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion NTDLS.Katzebase.Shared/NTDLS.Katzebase.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<Version>0.12.0.0</Version>
<Version>0.13.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 74af9d9

Please sign in to comment.