Skip to content

Commit

Permalink
Ensure data retrieval query is run in proper database context
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Price committed Oct 30, 2019
1 parent 31819e8 commit f9b8a9e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
- Initial release.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -23,6 +23,10 @@ Can be raised here: <https://github.com/ecirpnaes/SimpleDataScripter/issues>

## Release Notes

### 0.1.0
## 0.1.1

- See ChangeLog.

## 0.1.0

- Initial release.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f9b8a9e

Please sign in to comment.