neueda / jetbrains-plugin-graph-database-support

Graph Databases support for JetBrains family IDEs.
Apache License 2.0
222 stars 56 forks source link

Bind query params per .cql file #91

Open jasperblues opened 5 years ago

jasperblues commented 5 years ago
@Service()
export class OrganisationManager extends Object {

    constructor(@Inject("database") readonly db: BoltAdapter,
                @CypherQuery("organisationManager/get") readonly getQuery: string)   
                 ^--- Query is injected
    {
        super();
    }

    public async list(): Promise<Organisation[]> {
        const result = await this.db.query(this.getQuery);
        return plainToClass(Organisation, result.data);
    }
}

I'm working in TypeScript as follows:

So using your amazing plugin we have:

What would be cool is if we could query parameters to each .cql file individually. This way no need to update parameters as we test/modify/update individual queries for evolving use-case requirements.

ex3m1024 commented 5 years ago

We have released version 2.5.6, which includes custom parameter support for each of the opened Cypher files, and much more. Please let us know if the implemented functionality is sufficient for your needs, or if there are must-haves you would like to request. Thanks!

jasperblues commented 5 years ago

@ex3m1024 Very cool, I'll give it a try tonight.