Skip to content

Commit db2012f

Browse files
Merge pull request #217 from tlaguz/patch-1
Fix lastval in PostgresCompiler for SqlKata.Execution
2 parents 74e6265 + 16e658f commit db2012f

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)