不要怂,就是干,撸起袖子干!

Commit d259cec7 by Sascha Depold

docs

1 parent 69110093
......@@ -311,13 +311,13 @@
},
{
"file": "lib/dialects/abstract/query.js",
"line": 345,
"line": 350,
"description": "The function takes the result of the query execution and groups\nthe associated data by the callee.\n\nExample:\n groupDataByCalleeFactory([\n {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 1 }\n }, {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 2 }\n }, {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 3 }\n }\n ])\n\nResult:\n Something like this:\n\n [\n {\n callee: { some: 'data', id: 1 },\n association: [\n { foo: 'bar', id: 1 },\n { foo: 'bar', id: 2 },\n { foo: 'bar', id: 3 }\n ]\n }\n ]",
"class": "QueryInterface"
},
{
"file": "lib/dialects/abstract/query.js",
"line": 405,
"line": 410,
"description": "This function will prepare the result of select queries with joins.",
"params": [
{
......@@ -542,11 +542,11 @@
},
{
"message": "Missing item type\nThe function takes the result of the query execution and groups\nthe associated data by the callee.\n\nExample:\n groupDataByCalleeFactory([\n {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 1 }\n }, {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 2 }\n }, {\n callee: { some: 'data', id: 1 },\n association: { foo: 'bar', id: 3 }\n }\n ])\n\nResult:\n Something like this:\n\n [\n {\n callee: { some: 'data', id: 1 },\n association: [\n { foo: 'bar', id: 1 },\n { foo: 'bar', id: 2 },\n { foo: 'bar', id: 3 }\n ]\n }\n ]",
"line": " lib/dialects/abstract/query.js:345"
"line": " lib/dialects/abstract/query.js:350"
},
{
"message": "Missing item type\nThis function will prepare the result of select queries with joins.",
"line": " lib/dialects/abstract/query.js:405"
"line": " lib/dialects/abstract/query.js:410"
},
{
"message": "Missing item type\nSearch for an instance.",
......
......@@ -410,9 +410,14 @@ module.exports = (function() {
dao[accessor] = isEmpty ? null : daoInstance
} else {
dao[accessor] = dao[accessor] || []
if (! isEmpty)
if (!isEmpty) {
dao[accessor].push(daoInstance)
}
}
// add the accessor to the eagerly loaded associations array
dao.__eagerlyLoadedAssociations = Utils._.uniq(dao.__eagerlyLoadedAssociations.concat([accessor]))
})
}
......
......@@ -90,7 +90,7 @@
<div class="file">
<pre class="code prettyprint linenums">
Utils = require(&quot;..&#x2F;..&#x2F;utils&quot;)
var Utils = require(&quot;..&#x2F;..&#x2F;utils&quot;)
&#x2F;**
Returns an object that treats SQLite&#x27;s inabilities to do certain queries.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!