From f9b8a9ef063c43260bd0d588c53573b3b468dc19 Mon Sep 17 00:00:00 2001 From: Sean Price Date: Wed, 30 Oct 2019 12:04:52 -0400 Subject: [PATCH] Ensure data retrieval query is run in proper database context --- CHANGELOG.md | 10 +++++++--- README.md | 8 ++++++-- package.json | 2 +- src/extension.ts | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 635d927..53a59d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ # Change Log + All notable changes to the "simple-data-scripter" extension will be documented in this file. -Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## 0.1.1 + +- Ensure data retrieval query is run in proper database context + +## 0.1.0 -## [Unreleased] -- Initial release \ No newline at end of file +- Initial release. diff --git a/README.md b/README.md index 98a0de3..fb53af2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This extension provides a quick and easy way to migrate data between tables by g ## Installation -The current release is available to [download as a .vsix file](https://github.com/ecirpnaes/SimpleDataScripter/releases/download/0.1.0/simple-data-scripter-0.1.0.vsix) and can be installed by opening the File Menu and selecting `Install Extension from VSIX Package` +The current release is available to [download as a .vsix file](https://github.com/ecirpnaes/SimpleDataScripter/releases/download/0.1.1/simple-data-scripter-0.1.1.vsix) and can be installed by opening the File Menu and selecting `Install Extension from VSIX Package` ## Features @@ -23,6 +23,10 @@ Can be raised here: ## Release Notes -### 0.1.0 +## 0.1.1 + +- See ChangeLog. + +## 0.1.0 - Initial release. diff --git a/package.json b/package.json index 3f4e723..db615fb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "simple-data-scripter", "displayName": "Simple Data Scripter", "description": "Creates insert scripts for a given table", - "version": "0.1.0", + "version": "0.1.1", "publisher": "seanprice", "repository": "https://github.com/ecirpnaes/SimpleDataScripter.git", "license": "MIT", diff --git a/src/extension.ts b/src/extension.ts index 1e178a1..6ab61b4 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -23,6 +23,9 @@ export function activate(context: vscode.ExtensionContext) { return; } + // Ensure that we run this query in the proper context by prepending a "use {database};" + sql = `Use [${oeContext.connectionProfile.databaseName}]; ` + sql; + let args: ScriptingArgs = { context: oeContext, tableName: tableName,