use toSql interface