Skip to content

Commit 16e658f

Browse files
authored
Fix lastval in PostgresCompiler for SqlKata.Execution
1 parent 74e6265 commit 16e658f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

QueryBuilder/Compilers/PostgresCompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class PostgresCompiler : Compiler
44
{
55
public PostgresCompiler()
66
{
7-
LastId = "SELECT lastval()";
7+
LastId = "SELECT lastval() AS id";
88
}
99

1010
public override string EngineCode { get; } = EngineCodes.PostgreSql;
@@ -38,4 +38,4 @@ protected override string CompileBasicDateCondition(SqlResult ctx, BasicDateCond
3838
return sql;
3939
}
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)