static byId(id) {
        return __awaiter(this, void 0, void 0, function* () {
            const posts = yield Post.byWhere(`id = ${id}`);
            if (posts.length > 0)
                return posts[0];
            else
                return null;
        });
    }
// returns null if there is no such post
returns null if there is no such post
returns null if there is no such post
static byId(id) {
        return __awaiter(this, void 0, void 0, function* () {
            const posts = yield Post.byWhere(`id = ${id}`);
            if (posts.length > 0)
                return posts[0];
            else
                return null;
        });
    }
static byId ( id ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { const posts = yield Post . byWhere ( ` ${ id } ` ) ; if ( posts . length > 0 ) return posts [ 0 ] ; else return null ; } ) ; }
returns null if there is no such post
returns null if there is no such post