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 Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" />
<PackageVersion Include="Npgsql.DependencyInjection" Version="10.0.3" />
<PackageVersion Include="NSchema.Core" Version="3.0.0-alpha.38" />
<PackageVersion Include="NSchema.Core" Version="3.0.0-alpha.41" />
<PackageVersion Include="Testcontainers" Version="4.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageVersion Include="Npgsql" Version="10.0.3" />
Expand Down
3 changes: 2 additions & 1 deletion src/NSchema.Postgres/Models/ColumnRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ internal sealed record ColumnRow(
bool IsIdentity,
long? IdentityStart = null,
long? IdentityMinValue = null,
long? IdentityIncrement = null);
long? IdentityIncrement = null,
string? GeneratedExpression = null);
12 changes: 12 additions & 0 deletions src/NSchema.Postgres/Models/CompositeFieldRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace NSchema.Postgres.Models;

internal sealed record CompositeFieldRow(
string Schema,
string TypeName,
string FieldName,
int OrdinalPosition,
string DataType,
string UdtName,
int? MaxLength,
int? Precision,
int? Scale);
6 changes: 6 additions & 0 deletions src/NSchema.Postgres/Models/CompositeTypeRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace NSchema.Postgres.Models;

internal sealed record CompositeTypeRow(
string Schema,
string Name,
string? Comment);
7 changes: 7 additions & 0 deletions src/NSchema.Postgres/Models/DomainCheckRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace NSchema.Postgres.Models;

internal sealed record DomainCheckRow(
string Schema,
string DomainName,
string CheckName,
string Expression);
13 changes: 13 additions & 0 deletions src/NSchema.Postgres/Models/DomainRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace NSchema.Postgres.Models;

internal sealed record DomainRow(
string Schema,
string Name,
string DataType,
string UdtName,
int? MaxLength,
int? Precision,
int? Scale,
bool NotNull,
string? Default,
string? Comment);
15 changes: 15 additions & 0 deletions src/NSchema.Postgres/Models/ExclusionConstraintRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace NSchema.Postgres.Models;

/// <summary>
/// A row of exclusion-constraint metadata. Elements are carried positionally: each is a column name or an
/// expression (per <see cref="IsExpressions"/>) paired with the operator in <see cref="Operators"/>.
/// </summary>
internal sealed record ExclusionConstraintRow(
string TableSchema,
string TableName,
string ConstraintName,
string? Method,
string? Predicate,
string[] ElementTexts,
bool[] IsExpressions,
string[] Operators);
6 changes: 6 additions & 0 deletions src/NSchema.Postgres/Models/ExtensionRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace NSchema.Postgres.Models;

internal sealed record ExtensionRow(
string Name,
string? Version,
string? Comment);
13 changes: 11 additions & 2 deletions src/NSchema.Postgres/Models/IndexRow.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
namespace NSchema.Postgres.Models;

/// <summary>
/// A row of index metadata. Columns are carried positionally: the first <see cref="NumKeyAtts"/> entries are the
/// index keys (a column name or an expression, per <see cref="IsExpressions"/>, with ordering in
/// <see cref="Options"/>); the remainder are covering <c>INCLUDE</c> columns.
/// </summary>
internal sealed record IndexRow(
string SchemaName,
string TableName,
string IndexName,
bool IsUnique,
string[] ColumnNames,
string? Predicate);
string? Method,
int NumKeyAtts,
string? Predicate,
string[] ColumnTexts,
bool[] IsExpressions,
int[] Options);
16 changes: 16 additions & 0 deletions src/NSchema.Postgres/Models/TriggerRow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace NSchema.Postgres.Models;

/// <summary>
/// A row of trigger metadata. <see cref="TgType"/> is the raw pg_trigger.tgtype bitmask (timing/level/events),
/// decoded into the model's enums when mapped.
/// </summary>
internal sealed record TriggerRow(
string TableSchema,
string TableName,
string Name,
int TgType,
string Function,
string? When,
string[] UpdateOfColumns,
string? FunctionArguments,
string? Comment);
3 changes: 2 additions & 1 deletion src/NSchema.Postgres/Models/ViewRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ namespace NSchema.Postgres.Models;
internal sealed record ViewRow(
string Schema,
string Name,
string Definition);
string Definition,
bool IsMaterialized);
2 changes: 1 addition & 1 deletion src/NSchema.Postgres/NSchema.Postgres.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>3.0.0-alpha.11</Version>
<Version>3.0.0-alpha.12</Version>
<AssemblyVersion>$(Version.Split('-')[0])</AssemblyVersion>
<FileVersion>$(Version.Split('-')[0])</FileVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Loading