croquiscom / cormo Goto Github PK
View Code? Open in Web Editor NEWORM framework for Node.js
Home Page: http://croquiscom.github.io/cormo/
ORM framework for Node.js
Home Page: http://croquiscom.github.io/cormo/
"column 'a', b: c: String" becomes 'a_b.c' instead of 'a_b_c'
Can use slave database for query
group by 시 그룹핑 된 레코드의 가장 첫번째 레코드의 특정 column 값을 반환 받고 싶습니다.
// e.g
Model.where().group('shop_id', { name: { $first: '$name' } })
try {
await Connection.transaction({ models: [ModelClass] }, (ModelClassTx) => {
// [Job 1] do something using ModelClassTx
throw new Error('An intentional error');
// [Job 2] do something using ModelClassTx
return Promise.resolve();
});
} catch (error) {
return { error };
}
I expect the above code affect nothing to db, but Job 1
is committed!
Exactly, the job is committed when MySQLAdapter::rollbackTransaction
is executed.
it's occure error when use Model.where().group()
before applySchemas.
e.g) User.where(email: email).upsert created_at: new Date(), updated_at: new Date()
needs to update only updated_at when updating.
await ZigzagFAQCategory.group(null, { current_order: { $max: '$order' } })
와 같이 칼럼명을 MySQL 예약어(order
)로 사용하는 경우 에러 발생
await ZigzagFAQCategory.group(null, { current_order: { $max: '$`order`' } })
와 같이 `
로 감싸줘서 임시방편으로 에러를 피해서 사용할 수 있긴 하지만, 예약어와 동일한 네이밍도 일반적으로 사용할 수 있으면 좋을 것 같습니다.
selectSingle
이 IQuerySingle
랑 IQueryArray
에만 있는데,
select
처럼 ITxModelClass
에도 있으면 .where()
같은 거 안 해도 돼서 좋겠습니다.
Model.where(id: $gte: Math.pow(2, 31))
fails
When writing raw query like (connection as any).adapter.query
, typescript cannot guarantee that query
method exists.
It will be convenient if modules are reloaded automatically for CORMO console
TypeORM Type
SQLAlchemy Mysql Dialect
모두 다 되면 좋겠지만 일단 mysql이라도 지원되면 참 좋을 것 같습니다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.