ID:2218538
 
BYOND Version:511.1373
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 57.0.2987.74
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
/datum/test
var/name = "test"
/proc/testing()
var/datum/test/T = new()
var/DBQuery/testQ = dbcon.NewQuery("SELECT * FROM things WHERE thing = [dbcon.Quote(T)]")
testQ.Execute()


dbcon.Quote(T) will return nothing.

The only reason i'm even reporting this is so you can go double check its not assuming it's a string valuetype and doing some out of bounds shit
I checked, and indeed this behavior is correct. Only strings are accepted. I think the behavior could be a little better in that it'd make much more sense to return an empty quoted string than nothing at all, however.
Generally, its assumed that in places where a string is expected, objects convert to their name as the string as a kind of implicit cast.

You can't do helpful shit like that in some cases and not get people shocked when it doesn't work like that in other cases.
True. Since this behavior has been around since the original DB stuff, though, which in BYOND terms is more or less literally forever, I think changes probably fall more in the realm of a feature request. I am of course open to such a feature.