| 641 | } |
| 642 | |
| 643 | void IdoPgsqlConnection::InternalDeactivateObject(const DbObject::Ptr& dbobj) |
| 644 | { |
| 645 | AssertOnWorkQueue(); |
| 646 | |
| 647 | if (!GetConnected()) |
| 648 | return; |
| 649 | |
| 650 | DbReference dbref = GetObjectID(dbobj); |
| 651 | |
| 652 | if (!dbref.IsValid()) |
| 653 | return; |
| 654 | |
| 655 | std::ostringstream qbuf; |
| 656 | qbuf << "UPDATE " + GetTablePrefix() + "objects SET is_active = 0 WHERE object_id = " << static_cast<long>(dbref); |
| 657 | IncreasePendingQueries(1); |
| 658 | Query(qbuf.str()); |
| 659 | |
| 660 | /* Note that we're _NOT_ clearing the db refs via SetReference/SetConfigUpdate/SetStatusUpdate |
| 661 | * because the object is still in the database. */ |
| 662 | |
| 663 | SetObjectActive(dbobj, false); |
| 664 | } |
| 665 | |
| 666 | bool IdoPgsqlConnection::FieldToEscapedString(const String& key, const Value& value, Value *result) |
| 667 | { |