Mercurial > hg > ng2-query-ismi
view app/query-state.ts @ 45:dc4f0541f04d ng2-rc1
update to angular2-rc1. mostly working ;-(
author | casties |
---|---|
date | Tue, 14 Jun 2016 20:00:39 +0200 |
parents | e8dc6a4c6773 |
children |
line wrap: on
line source
import {QueryStep} from './query-step'; export class QueryState { public steps: QueryStep[] = []; public resultCypherQuery: string; public attributesCypherQuery: string; public outRelsCypherQuery: string; public inRelsCypherQuery: string; public cypherQueryParams: any; public results: any[]; public numResults: number; public resultTypes: string; public resultInfo: string; public resultAttributes: string[]; public resultRelations: any[]; public resultColumns: any[]; getQueryText() { let text = this.resultCypherQuery; let hasParams = false; for (let k in this.cypherQueryParams) { if (!hasParams) { hasParams = true; text += '\n'; } text += `[${k}='${this.cypherQueryParams[k]}'] `; } return text; } }