Skip to content

Commit

Permalink
Added TenantId to IQuerySession signature. Closes GH-3141
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydmiller committed Apr 17, 2024
1 parent 4b35ef0 commit 25629da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/Marten/IQuerySession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public interface IQuerySession: IDisposable, IAsyncDisposable
/// </summary>
string? CorrelationId { get; set; }

/// <summary>
/// The tenant id for this session. If not opened with a tenant id, this value will be "*DEFAULT*"
/// </summary>
string TenantId { get; }

/// <summary>
/// Find or load a single document of type T by a string id
/// </summary>
Expand Down Expand Up @@ -216,7 +221,7 @@ public interface IQuerySession: IDisposable, IAsyncDisposable
/// Asynchronously queries the document storage with the supplied SQL.
/// The type parameters can be any document class, scalar or JSON-serializable class.
/// For each result type parameter, the SQL SELECT statement must contain a ROW.
/// For document types, the row must contain the required fields in the correct order,
/// For document types, the row must contain the required fields in the correct order,
/// depending on the session type and the metadata the document might use, at least id and data must be
/// provided.
/// </summary>
Expand All @@ -231,7 +236,7 @@ public interface IQuerySession: IDisposable, IAsyncDisposable
/// Asynchronously queries the document storage with the supplied SQL.
/// The type parameters can be any document class, scalar or JSON-serializable class.
/// For each result type parameter, the SQL SELECT statement must contain a ROW.
/// For document types, the row must contain the required fields in the correct order,
/// For document types, the row must contain the required fields in the correct order,
/// depending on the session type and the metadata the document might use, at least id and data must be
/// provided.
/// </summary>
Expand Down Expand Up @@ -260,7 +265,7 @@ public interface IQuerySession: IDisposable, IAsyncDisposable
/// Asynchronously queries the document storage with the supplied SQL.
/// The type parameters can be any document class, scalar or JSON-serializable class.
/// For each result type parameter, the SQL SELECT statement must contain a ROW.
/// For document types, the row must contain the required fields in the correct order,
/// For document types, the row must contain the required fields in the correct order,
/// depending on the session type and the metadata the document might use, at least id and data must be
/// provided.
/// </summary>
Expand All @@ -275,7 +280,7 @@ public interface IQuerySession: IDisposable, IAsyncDisposable
/// Asynchronously queries the document storage with the supplied SQL.
/// The type parameters can be any document class, scalar or JSON-serializable class.
/// For each result type parameter, the SQL SELECT statement must contain a ROW.
/// For document types, the row must contain the required fields in the correct order,
/// For document types, the row must contain the required fields in the correct order,
/// depending on the session type and the metadata the document might use, at least id and data must be
/// provided.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Marten/Internal/IMartenSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface IMartenSession: IDisposable, IAsyncDisposable
{
ISerializer Serializer { get; }
Dictionary<Type, object> ItemMap { get; }
string TenantId { get; }
public string TenantId { get; }
IMartenDatabase Database { get; }

VersionTracker Versions { get; }
Expand Down

0 comments on commit 25629da

Please sign in to comment.