Skip to content

Instantly share code, notes, and snippets.

View dclarke-modus's full-sized avatar

dclarke-modus

View GitHub Profile
select * from `blah`.`DataCapturePropertyInfo`
where `dataCaptureFormInfoID` = ? and exists
(select * from `blah`.`DataCapturePropertiesFields`
where `blah`.`DataCapturePropertyInfo`.`dataCapturePropertiesFieldID` = `blah`.`DataCapturePropertiesFields`.`dataCapturePropertiesFieldID`
and `fieldName` = ?)
public function apply($model, RepositoryInterface $repository)
{
$query = $model->whereHas('dataCapturePropertiesField', function($query)
select * from `blah`.`DataCapturePropertyInfo`
inner join `dataCapturePropertiesField` on
`dataCapturePropertiesFieldID` = `dataCapturePropertiesFieldID`
where `dataCaptureFormInfoID` = ?
$query = $model->join('dataCapturePropertiesField', "dataCapturePropertiesFieldID", "=","dataCapturePropertiesFieldID");
return $query;
@foreach ($scenarios as $scenario)
@include('partials.report-scenarios-item', array('headings' => $scenario))
@if (array_key_exists($counter, $indicators))
@include('partials.report-indicator-item', array('indicators' => $indicators[$counter], 'fields' => $indicatorFields))
@endif
@php $counter++;
@endforeach
@php
$columnCount = 0;
$counter = 0;
$scenarios = array_chunk($valuationScenarios, 3);
$indicators = array_chunk($valuationScenarioData, 3);
@endphp
@if (count($scenarios) > 0)
@foreach ($scenarios as $scenario)
<div class="page">
error: Sending 500 ("Server Error") response:
TypeError: sails.getDatastore is not a function
at Object.generateToken (/var/www/api/api/services/Oauth2TokenGranterService.js:13:23)
at Object.wrapper [as generateToken] (/var/www/api/node_modules/@sailshq/lodash/lib/index.js:3250:19)
at Object.token (/var/www/api/api/controllers/AuthController.js:19:28)
at wrapper (/var/www/api/node_modules/@sailshq/lodash/lib/index.js:3250:19)
at routeTargetFnWrapper (/var/www/api/node_modules/sails/lib/router/bind.js:181:5)
at callbacks (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:164:37)
at param (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:138:11)
at param (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:135:11)
client: [{
url:"127.0.0.1",
clientid: "blahblah",
clientpassword: "blahblah",
email: "[email protected]",
scopes: [{
"controller": "service",
"action": "get"
}]
client: [{
url:"127.0.0.1",
clientid: "blahblah",
clientpassword: "blahblah",
email: "[email protected]",
scopes: [{
"controller": "service",
"action": "get"
}]
//Error when running `sails debug`:
//Client Model
module.exports = {
connection: "mongodbServer",
attributes: {
url: {
type: 'string',
required: true
},
//Client Model
module.exports = {
connection: "mongodbServer",
attributes: {
url: {
type: 'string',
required: true
},
$ npm install
> [email protected] preinstall /var/www/api/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js
> [email protected] preinstall /var/www/api/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js
npm WARN prefer global [email protected] should be installed with -g