edge-sql.js jak ustawić połączenieString?
var edge = require('edge');
var getProduct = edge.func('sql', function () {/*
select * from Products
where ProductId = @myProductId
*/});
getProduct({ myProductId: 10 }, function (error, result) {
if (error) throw error;
console.log(result);
});
Ten kod działa dobrze, ale czuję się nieswojo, ustawiając ciąg ConnectionString jako ENVIROMENT_VARIALBE!
set EDGE_SQL_CONNECTION_STRING=Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True
Ale nie mogę znaleźć innego sposobu, aby to zrobić! Nawet naGitHub Nie mogę znaleźć innego sposobu na ustawienie ConnectionString! Zastanawiam się więc, czy w OOB edge-sql.js jest możliwe ustawienie parametru ConnectionString w kodzie?