Skip to content

Commit

Permalink
Non-optional entity in insertRow to match upstream ZeeQL
Browse files Browse the repository at this point in the history
W/o the entity, we don't know the table to insert into.
  • Loading branch information
helje5 committed Nov 24, 2024
1 parent a442e70 commit 7ca9f15
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Sources/PostgreSQLAdaptor/PostgreSQLAdaptorChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,10 @@ open class PostgreSQLAdaptorChannel : AdaptorChannel, SmartDescription {

// MARK: - Insert w/ auto-increment support

open func insertRow(_ row: AdaptorRow, _ entity: Entity?, refetchAll: Bool)
open func insertRow(_ row: AdaptorRow, _ entity: Entity, refetchAll: Bool)
throws -> AdaptorRow
{
let attributes : [ Attribute ]? = {
guard let entity = entity else { return nil }

let attributes : [ Attribute ]? = {
if refetchAll { return entity.attributes }

// TBD: refetch-all if no pkeys are assigned
Expand Down

0 comments on commit 7ca9f15

Please sign in to comment.