Mercurial > hg > ng2-query-ismi
view app/query-state.ts @ 39:7578b21cdf2e
make relation types configurable.
relations can have custom labels for incoming or outgoing direction.
author | casties |
---|---|
date | Sun, 14 Feb 2016 19:40:07 +0100 |
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; } }