Loopback 3.0 MySQL discoverSchemas not returning dataHow to I move MySQL data files onto different partition?MySQL Data Modeling on netbookHow can I load XML data into a MySQL database?Move mysql data dir to TrueCrypt volumeLoading data into mysql databaseFirewall blocking mySQL portMysql data provider for TORAError Changing MYSQL Data Directoryhow to extract data from a mysqlCan not insert data mysql using python with pymysql
Should I outline or discovery write my stories?
WiFi Thermostat, No C Terminal on Furnace
Argument list too long when zipping large list of certain files in a folder
How much character growth crosses the line into breaking the character
What is this called? Old film camera viewer?
How to bake one texture for one mesh with multiple textures blender 2.8
Is there a name for this algorithm to calculate the concentration of a mixture of two solutions containing the same solute?
If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?
Where does the bonus feat in the cleric starting package come from?
Is it safe to use olive oil to clean the ear wax?
What should you do if you miss a job interview (deliberately)?
Longest common substring in linear time
Yosemite Fire Rings - What to Expect?
GraphicsGrid with a Label for each Column and Row
Fear of getting stuck on one programming language / technology that is not used in my country
Drawing ramified coverings with tikz
Is the U.S. Code copyrighted by the Government?
Why does the Sun have different day lengths, but not the gas giants?
Can I sign legal documents with a smiley face?
What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?
How to explain what's wrong with this application of the chain rule?
Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed
What should you do when eye contact makes your subordinate uncomfortable?
How do I color the graph in datavisualization?
Loopback 3.0 MySQL discoverSchemas not returning data
How to I move MySQL data files onto different partition?MySQL Data Modeling on netbookHow can I load XML data into a MySQL database?Move mysql data dir to TrueCrypt volumeLoading data into mysql databaseFirewall blocking mySQL portMysql data provider for TORAError Changing MYSQL Data Directoryhow to extract data from a mysqlCan not insert data mysql using python with pymysql
I am having an issue when trying to obtain data from a MySQL database using LoopBack when I createModel. I am not getting any database back but there's data in the table. I get the following return [] which is an empty bracket.
Below is the code.
async function discover()
const options = relations: true;
dSource = loopback.createDataSource('sqlData',
"host": "000.000.000.000",
"port": 3306,
"database": "devDatabase",
"username": "application",
"password": "password123",
"name": "sqlData",
"connector": "mysql"
);
console.log('Position 1');
//var model_test = await dSource.discoverSchemas('app_alerts', options);
model_test = "app_alerts":"name":"AppAlerts","options":"idInjection":false,"mysql":"schema":"apiAuthoCustomerDB-Dev","table":"app_alerts","relations":,"properties":"alertId":"type":"Number","required":true,"length":null,"precision":10,"scale":0,"id":1,"mysql":"columnName":"alert_id","dataType":"int","dataLength":null,"dataPrecision":10,"dataScale":0,"nullable":"N","alert":"type":"String","required":false,"length":45,"precision":null,"scale":null,"mysql":"columnName":"alert","dataType":"varchar","dataLength":45,"dataPrecision":null,"dataScale":null,"nullable":"Y"
console.log('Position 2');
var modelSchemas = dSource.createModel('app_alerts', model_test);
console.log('Position 3');
modelSchemas.find(function(err, user)
console.log('Position 4');
console.log(user);
);
discover();
mysql nodejs
New contributor
add a comment |
I am having an issue when trying to obtain data from a MySQL database using LoopBack when I createModel. I am not getting any database back but there's data in the table. I get the following return [] which is an empty bracket.
Below is the code.
async function discover()
const options = relations: true;
dSource = loopback.createDataSource('sqlData',
"host": "000.000.000.000",
"port": 3306,
"database": "devDatabase",
"username": "application",
"password": "password123",
"name": "sqlData",
"connector": "mysql"
);
console.log('Position 1');
//var model_test = await dSource.discoverSchemas('app_alerts', options);
model_test = "app_alerts":"name":"AppAlerts","options":"idInjection":false,"mysql":"schema":"apiAuthoCustomerDB-Dev","table":"app_alerts","relations":,"properties":"alertId":"type":"Number","required":true,"length":null,"precision":10,"scale":0,"id":1,"mysql":"columnName":"alert_id","dataType":"int","dataLength":null,"dataPrecision":10,"dataScale":0,"nullable":"N","alert":"type":"String","required":false,"length":45,"precision":null,"scale":null,"mysql":"columnName":"alert","dataType":"varchar","dataLength":45,"dataPrecision":null,"dataScale":null,"nullable":"Y"
console.log('Position 2');
var modelSchemas = dSource.createModel('app_alerts', model_test);
console.log('Position 3');
modelSchemas.find(function(err, user)
console.log('Position 4');
console.log(user);
);
discover();
mysql nodejs
New contributor
add a comment |
I am having an issue when trying to obtain data from a MySQL database using LoopBack when I createModel. I am not getting any database back but there's data in the table. I get the following return [] which is an empty bracket.
Below is the code.
async function discover()
const options = relations: true;
dSource = loopback.createDataSource('sqlData',
"host": "000.000.000.000",
"port": 3306,
"database": "devDatabase",
"username": "application",
"password": "password123",
"name": "sqlData",
"connector": "mysql"
);
console.log('Position 1');
//var model_test = await dSource.discoverSchemas('app_alerts', options);
model_test = "app_alerts":"name":"AppAlerts","options":"idInjection":false,"mysql":"schema":"apiAuthoCustomerDB-Dev","table":"app_alerts","relations":,"properties":"alertId":"type":"Number","required":true,"length":null,"precision":10,"scale":0,"id":1,"mysql":"columnName":"alert_id","dataType":"int","dataLength":null,"dataPrecision":10,"dataScale":0,"nullable":"N","alert":"type":"String","required":false,"length":45,"precision":null,"scale":null,"mysql":"columnName":"alert","dataType":"varchar","dataLength":45,"dataPrecision":null,"dataScale":null,"nullable":"Y"
console.log('Position 2');
var modelSchemas = dSource.createModel('app_alerts', model_test);
console.log('Position 3');
modelSchemas.find(function(err, user)
console.log('Position 4');
console.log(user);
);
discover();
mysql nodejs
New contributor
I am having an issue when trying to obtain data from a MySQL database using LoopBack when I createModel. I am not getting any database back but there's data in the table. I get the following return [] which is an empty bracket.
Below is the code.
async function discover()
const options = relations: true;
dSource = loopback.createDataSource('sqlData',
"host": "000.000.000.000",
"port": 3306,
"database": "devDatabase",
"username": "application",
"password": "password123",
"name": "sqlData",
"connector": "mysql"
);
console.log('Position 1');
//var model_test = await dSource.discoverSchemas('app_alerts', options);
model_test = "app_alerts":"name":"AppAlerts","options":"idInjection":false,"mysql":"schema":"apiAuthoCustomerDB-Dev","table":"app_alerts","relations":,"properties":"alertId":"type":"Number","required":true,"length":null,"precision":10,"scale":0,"id":1,"mysql":"columnName":"alert_id","dataType":"int","dataLength":null,"dataPrecision":10,"dataScale":0,"nullable":"N","alert":"type":"String","required":false,"length":45,"precision":null,"scale":null,"mysql":"columnName":"alert","dataType":"varchar","dataLength":45,"dataPrecision":null,"dataScale":null,"nullable":"Y"
console.log('Position 2');
var modelSchemas = dSource.createModel('app_alerts', model_test);
console.log('Position 3');
modelSchemas.find(function(err, user)
console.log('Position 4');
console.log(user);
);
discover();
mysql nodejs
mysql nodejs
New contributor
New contributor
New contributor
asked 10 mins ago
MatthewMatthew
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Matthew is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128192%2floopback-3-0-mysql-discoverschemas-not-returning-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Matthew is a new contributor. Be nice, and check out our Code of Conduct.
Matthew is a new contributor. Be nice, and check out our Code of Conduct.
Matthew is a new contributor. Be nice, and check out our Code of Conduct.
Matthew is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128192%2floopback-3-0-mysql-discoverschemas-not-returning-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown