comparison src/app/query-state.ts @ 47:b65a031c4967 ng2-final

first step to angular2-final (2.4) version of the query browser.
author casties
date Fri, 17 Mar 2017 20:16:52 +0100
parents app/query-state.ts@e8dc6a4c6773
children 308c96f734c8
comparison
equal deleted inserted replaced
46:1f3fed01aef6 47:b65a031c4967
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 }