I'm new to angularjs and I'm creating an offline app. I'm trying to import some json objects inside a SQLite database.
I create the db with Angular and everything was fine. Now I must process the objects: Every object has a structure like this:
{
"id" : 5306,
"quiz_type" : "oltre",
"error_count" : 0,
"done_count" : 0,
"text" : "Su quale pubblicazione dell'Istituto Idrografico della Marina si possono ricavare informazioni più specifiche sulle maree?",
"image" : {
"image" : {
"url" : "/images/fallback/default.png"
}
},
"section" : {
"name" : "Navigazione"
},
"answers" : [
{
"text" : "Sul Portolano",
"correct" : false
},
{
"text" : "Sulle Effemeridi Nautiche",
"correct" : false
},
{
"text" : "Sulle Tavole di marea",
"correct" : true
}
]
}
I cannot store json object inside the db because I must query for random object filtering by section, error_count and done_count. I can add an item to my db, but I cannot understand how can I handle association. How can I create a query that insert one object inside my db with association?
I already created the schema.
Aucun commentaire:
Enregistrer un commentaire