Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CoreTests/jasper_fx_mechanics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task build_system_part_for_single_document_store_and_single_tenancy
.SingleOrDefault();

part.ShouldNotBeNull();
part.SubjectUri.ShouldBe(new Uri("marten://documentstore"));
part.SubjectUri.ShouldBe(new Uri("marten://store"));
part.Title.ShouldBe("Marten");

var resources = await part.FindResources();
Expand Down
276 changes: 276 additions & 0 deletions src/Marten.sln

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/Marten/Marten.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Schema\SQL\*.*" />

<EmbeddedResource Include="Schema\SchemaObjects.sql" />
</ItemGroup>

Expand All @@ -32,14 +33,15 @@

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="9.0.100" />
<PackageReference Include="JasperFx" Version="1.1.0" />
<PackageReference Include="JasperFx.Events" Version="1.1.0" />
<PackageReference Include="JasperFx.RuntimeCompiler" Version="4.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<!-- This is forced by Npgsql peer dependency -->
<PackageReference Include="Npgsql.Json.NET" Version="9.0.2" />
<PackageReference Include="Polly.Core" Version="8.5.2" />
<PackageReference Include="Weasel.Postgresql" Version="8.0.0" />
<PackageReference Include="JasperFx.Events" Version="1.2.0" />
<PackageReference Include="JasperFx" Version="1.2.0" />
<PackageReference Include="JasperFx.RuntimeCompiler" Version="4.0.0" />
<PackageReference Include="Weasel.Postgresql" Version="8.1.1" />
</ItemGroup>

<Import Project="../../Analysis.Build.props" />
</Project>
9 changes: 9 additions & 0 deletions src/Marten/MartenServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading.Tasks;
using JasperFx;
using JasperFx.CodeGeneration;
using JasperFx.CommandLine;
using JasperFx.CommandLine.Descriptions;
using JasperFx.Core.Reflection;
using JasperFx.Events;
Expand Down Expand Up @@ -185,6 +186,14 @@ Func<IServiceProvider, StoreOptions> optionSource
services.AddSingleton<IDocumentStore>(s =>
{
var options = s.GetRequiredService<StoreOptions>();

// for the purpose of not losing your sanity
// when running command line tools
if (JasperFxEnvironment.RunQuiet)
{
options.DisableNpgsqlLogging = true;
}

if (options.Logger().GetType() != typeof(NulloMartenLogger))
{
return new DocumentStore(options);
Expand Down
4 changes: 3 additions & 1 deletion src/Marten/MartenSystemPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ namespace Marten;

internal class MartenSystemPart : SystemPartBase
{
public static Uri MartenStoreUri { get; } = new Uri("marten://store");

private readonly IDocumentStore _store;

protected MartenSystemPart(IDocumentStore store, string title, Uri subjectUri) : base(title, subjectUri)
{
_store = store;
}

public MartenSystemPart(IDocumentStore store) : this(store, "Marten", new Uri("marten://documentstore"))
public MartenSystemPart(IDocumentStore store) : this(store, "Marten", MartenStoreUri)
{

}
Expand Down
3 changes: 2 additions & 1 deletion src/Marten/Schema/DocumentMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public DocumentMapping(Type documentType, StoreOptions storeOptions)

public IPartitionStrategy? Partitioning { get; set; }

[IgnoreDescription]
public DocumentCodeGen? CodeGen { get; private set; }

internal DocumentQueryableMemberCollection QueryMembers { get; }
Expand Down Expand Up @@ -443,7 +444,7 @@ public DocumentIndex AddLastModifiedIndex(Action<DocumentIndex>? configure = nul
}

/// <summary>
/// Creates an index on the tenantId column.
/// Creates an index on the tenantId column.
/// </summary>
/// <remarks>
/// Only applicable when using multi-tenancy for this table
Expand Down
2 changes: 2 additions & 0 deletions src/Marten/Storage/MartenDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JasperFx.Core;
using JasperFx.Core.Reflection;
using JasperFx.Descriptors;
using JasperFx.Events.Daemon;
Expand Down Expand Up @@ -101,6 +102,7 @@ public void Dispose()
public override DatabaseDescriptor Describe()
{
var descriptor = base.Describe();
descriptor.SubjectUri = MartenSystemPart.MartenStoreUri;
descriptor.SchemaOrNamespace = Options.DatabaseSchemaName;
return descriptor;
}
Expand Down
Loading