Skip to content

Commit

Permalink
last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CM Dev committed Apr 12, 2020
1 parent fbb1787 commit 1be226e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion code/datums/_ndatabase/code/bsql_adapter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@
var/esfield = "[escape_string(field)]"
if(!local_first)
local_text+=","
local_text += "'[escape_string(fields[field])]' as `[esfield]`"
if(fields[field] != null)
local_text += "'[escape_string(fields[field])]' as `[esfield]`"
else
local_text += "null as `[esfield]`"
if(first && !is_id)
if(!items_first)
update_items+=","
Expand Down
1 change: 0 additions & 1 deletion code/datums/_ndatabase/code/bsql_persistent_query.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
if(is_complete && !errored)
if(!query.last_result)
status = DB_QUERY_FINISHED
qdel(query)
query = null
return
status = DB_QUERY_READING
Expand Down
3 changes: 1 addition & 2 deletions code/datums/_ndatabase/code/native_persistent_query.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
while(query.NextRow())
var/list/current_row = query.GetRowData()
results += list(current_row)
affected_rows = query.RowsAffected()
qdel(query)
affected_rows = query.RowsAffected()
status = DB_QUERY_FINISHED

0 comments on commit 1be226e

Please sign in to comment.