diff --git a/src/ls/driver.ts b/src/ls/driver.ts index b912042..72bcbc1 100644 --- a/src/ls/driver.ts +++ b/src/ls/driver.ts @@ -174,4 +174,13 @@ export default class IRISDriver extends AbstractDriver im public getStaticCompletions: IConnectionDriver['getStaticCompletions'] = async () => { return keywordsCompletion; } + + public async getInsertQuery({item, columns}): Promise { + let insertQuery = `INSERT INTO ${item.schema}.${item.label} (${columns.map((col) => col.label).join(', ')}) VALUES (`; + columns.forEach((col, index) => { + insertQuery = insertQuery.concat(`'\${${index + 1}:${col.label}:${col.dataType}}', `); + }); + return insertQuery; + } + } diff --git a/src/ls/queries.ts b/src/ls/queries.ts index b0becf1..a6301e5 100644 --- a/src/ls/queries.ts +++ b/src/ls/queries.ts @@ -87,6 +87,7 @@ SELECT ? ` ${ValueColumn[type]} AS label, SCHEMA_NAME AS "schema", + SCHEMA_NAME || '.' || ${ValueColumn[type]} AS "snippet", '${type}' AS "type", ${type == ContextValue.VIEW ? `'TRUE'` : 'NULL'} AS isView, '0:' || ${ValueColumn[type]} AS sortText diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 7c5c084..307f00c 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -4,10 +4,14 @@ services: image: daimor/intersystems-cache:2016.2 ports: - 57772:57772 + volumes: + - ~/cache.key:/usr/cachesys/mgr/cache.key cache18: image: daimor/intersystems-cache:2018.1 ports: - 57773:57772 + volumes: + - ~/cache.key:/usr/cachesys/mgr/cache.key iris: build: iris init: true