Version: v0.7.1 - Beta.  We welcome contributors & feedback.

ObjectHooks.onToSqlString

onToSqlString() -> string

Description

This method is called whenever the object is used as a value in a database query. (e.g. via Db.insertRow, Db.updateRows, etc.)

It should return a standard string.

class User {

    ...

    public fn onToSqlString {

        return @.userId
    }
}

See Also