Getting a New Query
// This will cause you pain and grief...
var user = query.from( "users" )
.where( "username", rc.username )
.first();
var posts = query.from( "posts" ).get();
// This will error because `username` is not a column in `posts`.component {
property name="query" inject="QueryBuilder@qb";
function create( event, rc, prc ) {
// This will cause you pain and grief...
query.table( "posts" )
.where( "id", rc.id )
.update( event.getOnly( [ "body" ] ) );
}
}newQuery
Was this helpful?