Mercurial > hg > ng2-query-ismi
comparison src/app/query-state.ts @ 49:781a5387ca93
Merge with angular2-final branch
f8d6f8479e77011fd043c5feb2b14a476d0aaffc
author | casties |
---|---|
date | Mon, 20 Mar 2017 18:50:31 +0100 |
parents | b65a031c4967 |
children | 308c96f734c8 |
comparison
equal
deleted
inserted
replaced
43:39edd27d83e4 | 49:781a5387ca93 |
---|---|
1 import {QueryStep} from './query-step'; | |
2 import {ResultType} from './result-type'; | |
3 | |
4 export class QueryState { | |
5 public steps: QueryStep[] = []; | |
6 | |
7 public resultCypherQuery: string; | |
8 public attributesCypherQuery: string; | |
9 public outRelsCypherQuery: string; | |
10 public inRelsCypherQuery: string; | |
11 public cypherQueryParams: any; | |
12 | |
13 public results: any[]; | |
14 public numResults: number; | |
15 public resultTypes: string; | |
16 public resultType: ResultType; | |
17 public resultInfo: string; | |
18 public resultAttributes: string[]; | |
19 public resultRelations: any[]; | |
20 public resultColumns: any[]; | |
21 | |
22 getQueryText() { | |
23 let text = this.resultCypherQuery; | |
24 let hasParams = false; | |
25 for (let k in this.cypherQueryParams) { | |
26 if (!hasParams) { | |
27 hasParams = true; | |
28 text += '\n'; | |
29 } | |
30 text += `[${k}='${this.cypherQueryParams[k]}'] `; | |
31 } | |
32 return text; | |
33 } | |
34 } |