Comments (5)
@cognitom Have this support for json datatype would be hugely beneficials. Is this something that's going to be supported in the near future? I am comparing this with mosql which only support postgres.
from momy.
Hi @joannechan, momy
supports only these types described in README.
We may have two options, I think.
- make
momy
more customizable: custom converter or something - add JSON data type support
The latter one would be easier to implement, but analyzing JSON
type may have some difficulty.
Note: MySQL has no array
data type, but in v5.7 they introduced the new type for JSON
.
from momy.
To achieve the first option, we may need to allow JavaScript style configuration (momyfile.js
), instead of momyfile.json
.
// momyfile.js could be like this...?
const config = {
"src": "mongodb://localhost:27017/dbname",
"dist": "mysql://root:password@localhost:3306/dbname",
"prefix": "t_",
"case": "camel",
"collections": {
"collection1": {
"_id": "number",
"field1": "string",
// This doesn't work at this point,
// but this type of conversion could be useful in some cases.
"field2": {
"type": "string",
"convert": val => Array.isArray(val) ? val.join('\t') : val
}
}
}
}
export default config
from momy.
i strongly agree with @joannechan supporting arrays would be so much useful especially when it comes to mongoDB, its hard to find a database without arrays. But is it possible to treat the array as a collection and documents inside would be the collection documents ? since they also have an _id field
from momy.
Maybe my contribute progress #31 fit with your requirements, i had already implement feature that if some column have data type like array on json, it will be maping to new table and adding parent ID to that row, just add some relations object key on momyfile.json to make it read the mapping.
cc @joannechan , @Xsmael (sorry for directly mention, just want to be helpful)
PS: Sorry, if my english language so bad.
from momy.
Related Issues (20)
- MongoDB cannot login, always Authentication failed HOT 10
- mongo -> mysql import, ER_TOO_LONG_KEY HOT 2
- No more documents in tailed cursor HOT 2
- Error if datetime is type object HOT 5
- ns field has bson.D value that is not string or valid MongoDb HOT 2
- ER_PARSE_ERROR HOT 2
- Error When Streaming HOT 1
- Replica set with data HOT 1
- operation exceeded time limit
- dynamic addition of collections to sync HOT 1
- migrate into two database
- I want Mysql to mysql with live transfer
- datetime is null in mysql HOT 2
- First record empty and data not synced HOT 2
- Data not updated in MySQL after chagne in MongoDB HOT 3
- Custom converters or filters HOT 3
- Todo: code coverage HOT 1
- Todo: more tests
- Tests on Travis fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from momy.