├── .gitignore ├── .pipelines ├── localization-pipeline.yml └── release-pipeline.yml ├── .vscode ├── launch.json ├── settings.json ├── tasks.json └── tasks.json.old ├── .vscodeignore ├── LICENSE ├── README.md ├── SECURITY.md ├── coverconfig.json ├── documentation ├── developer_documentation.md └── quickstart.md ├── gulpfile.js ├── i18n ├── chs │ └── package.i18n.json ├── cht │ └── package.i18n.json ├── deu │ └── package.i18n.json ├── esn │ └── package.i18n.json ├── fra │ └── package.i18n.json ├── ita │ └── package.i18n.json ├── jpn │ └── package.i18n.json ├── kor │ └── package.i18n.json ├── ptb │ └── package.i18n.json └── rus │ └── package.i18n.json ├── images ├── connection-details-dialog.png ├── dark │ └── mysql_inverse.svg ├── extension-icon.png ├── light │ └── mysql.svg ├── new-connection.png └── new-database.svg ├── package.json ├── package.nls.json ├── snippets └── mysql.json ├── src ├── LocProject.json ├── config.json ├── constants.ts ├── contextProvider.ts ├── contracts │ └── contracts.ts ├── dialogs │ └── newDatabaseDialog.ts ├── features │ ├── contracts.ts │ ├── dbDesigner.ts │ ├── firewall.ts │ └── telemetry.ts ├── l10n │ ├── l10n.xlf │ └── transXlf │ │ ├── l10n.de.xlf │ │ ├── l10n.es.xlf │ │ ├── l10n.fr.xlf │ │ ├── l10n.it.xlf │ │ ├── l10n.ja.xlf │ │ ├── l10n.ko.xlf │ │ ├── l10n.pt-BR.xlf │ │ ├── l10n.ru.xlf │ │ ├── l10n.zh-Hans.xlf │ │ └── l10n.zh-Hant.xlf ├── loc │ ├── de │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── es │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── fr │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── it │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── ja │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── ko │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── pt-BR │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── ru │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ ├── zh-Hans │ │ └── src │ │ │ └── l10n │ │ │ └── l10n.xlf.lcl │ └── zh-Hant │ │ └── src │ │ └── l10n │ │ └── l10n.xlf.lcl ├── main.ts ├── models │ └── newDatabaseModels.ts ├── telemetry.ts ├── uiConstants.ts ├── utils.ts └── utils │ ├── PromiseUtils.ts │ └── toolsserviceUtils.ts ├── syntaxes └── mysql-injection.json ├── tasks ├── config.js ├── covertasks.js └── packagetasks.js ├── tsconfig.json ├── tslint.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | ossdbtoolsservice 2 | node_modules 3 | out 4 | *nls.*.json 5 | *.vsix 6 | -------------------------------------------------------------------------------- /.pipelines/localization-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | batch: true 3 | branches: 4 | include: 5 | - main 6 | paths: 7 | include: 8 | - src/l10n/l10n.xlf 9 | - src/loc 10 | 11 | pr: none 12 | 13 | resources: 14 | repositories: 15 | - repository: self 16 | type: git 17 | ref: refs/heads/main 18 | 19 | jobs: 20 | - job: localization 21 | displayName: localization 22 | pool: 23 | vmImage: windows-latest 24 | steps: 25 | - checkout: self 26 | clean: true 27 | fetchTags: true 28 | - task: cesve.one-loc-build.one-loc-build.OneLocBuild@2 29 | displayName: 'Localization Build: src/LocProject.json' 30 | inputs: 31 | locProj: src/LocProject.json 32 | isCreatePrSelected: true 33 | repoType: gitHub 34 | gitHubPatVariable: $(githubPatToken) 35 | isAutoCompletePrSelected: false 36 | packageSourceAuth: patAuth 37 | patVariable: $(OneLocBuildPat) 38 | - task: ManifestGeneratorTask@0 39 | inputs: 40 | BuildDropPath: '$(Build.ArtifactStagingDirectory)' 41 | - task: PublishBuildArtifacts@1 42 | displayName: 'Publish Artifact: drop' 43 | -------------------------------------------------------------------------------- /.pipelines/release-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | pool: 4 | vmImage: 'ubuntu-latest' 5 | 6 | steps: 7 | - task: NodeTool@0 8 | inputs: 9 | versionSpec: '14.x' 10 | displayName: 'Install Node.js' 11 | - task: CmdLine@2 12 | displayName: 'Installing Dependencies' 13 | inputs: 14 | script: | 15 | sudo npm install -g yarn 16 | sudo npm install -g vsce 17 | - task: CmdLine@2 18 | displayName: 'Building Vsix Packages' 19 | inputs: 20 | script: | 21 | yarn install 22 | yarn run compile 23 | yarn run package 24 | yarn run package-offline 25 | - task: EsrpCodeSigning@2 26 | displayName: 'Code Signing' 27 | inputs: 28 | ConnectedServiceName: 'Database System ESRP Connector' 29 | FolderPath: '$(Build.SourcesDirectory)' 30 | Pattern: '*.vsix' 31 | useMinimatch: true 32 | signConfigType: inlineSignParams 33 | inlineOperation: | 34 | [ 35 | { 36 | "KeyCode" : "CP-233016", 37 | "OperationCode" : "OpcSign", 38 | "Parameters" : { 39 | "FileDigest" : "/fd SHA256" 40 | }, 41 | "ToolName" : "sign", 42 | "ToolVersion" : "1.0" 43 | }, 44 | { 45 | "KeyCode" : "CP-233016", 46 | "OperationCode" : "OpcVerify", 47 | "Parameters" : {}, 48 | "ToolName" : "sign", 49 | "ToolVersion" : "1.0" 50 | } 51 | ] 52 | SessionTimeout: '60' 53 | MaxConcurrency: '50' 54 | MaxRetryAttempts: '5' 55 | - task: CopyFiles@2 56 | inputs: 57 | sourceFolder: '$(Build.SourcesDirectory)' 58 | contents: '*.vsix' 59 | targetFolder: '$(Build.ArtifactStagingDirectory)' 60 | displayName: 'Copy Files' 61 | - task: PublishBuildArtifacts@1 62 | inputs: 63 | pathToPublish: '$(Build.ArtifactStagingDirectory)' 64 | artifactName: build 65 | displayName: 'Publish Artifacts' -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | 4 | // To debug the extension: 5 | // 1. please install the "Azure Data Studio Debug" extension into VSCode 6 | // 2. Ensure azuredatastudio is added to your path 7 | { 8 | "version": "0.1.0", 9 | "configurations": [ 10 | { 11 | "name": "MySQL Extension", 12 | "type": "sqlopsExtensionHost", 13 | "request": "launch", 14 | "runtimeExecutable": "azuredatastudio", 15 | "args": [ 16 | "--extensionDevelopmentPath=${workspaceFolder}" 17 | ], 18 | "outFiles": [ 19 | "${workspaceFolder}/out/**/*.js" 20 | ], 21 | "stopOnEntry": false, 22 | "sourceMaps": true, 23 | "preLaunchTask": "", 24 | "timeout": 25000 25 | }, 26 | { 27 | "name": "(Insiders) MySQL Extension", 28 | "type": "sqlopsExtensionHost", 29 | "request": "launch", 30 | "runtimeExecutable": "azuredatastudio-insiders", 31 | "args": [ 32 | "--extensionDevelopmentPath=${workspaceFolder}" 33 | ], 34 | "outFiles": [ 35 | "${workspaceFolder}/out/**/*.js" 36 | ], 37 | "stopOnEntry": false, 38 | "sourceMaps": true, 39 | "preLaunchTask": "", 40 | "timeout": 25000 41 | }, 42 | { 43 | "name": "MySQL Extension Tests", 44 | "type": "sqlopsExtensionHost", 45 | "request": "launch", 46 | "runtimeExecutable": "azuredatastudio", 47 | "args": [ 48 | "--extensionDevelopmentPath=${workspaceFolder}", 49 | "--extensionTestsPath=${workspaceFolder}/out/test" 50 | ], 51 | "stopOnEntry": false, 52 | "sourceMaps": true, 53 | "outFiles": [ 54 | "${workspaceFolder}/out/test/**/*.js" 55 | ], 56 | "preLaunchTask": "", 57 | "timeout": 25000 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.trimTrailingWhitespace": true, 4 | 5 | "files.exclude": { 6 | "out": false // set this to true to hide the "out" folder with the compiled JS files 7 | }, 8 | "search.exclude": { 9 | "out": true, // set this to false to include "out" folder in search results 10 | "coverage": true 11 | }, 12 | "typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version 13 | "files.watcherExclude": { 14 | "**/.git/objects/**": true, 15 | "**/out/*" : true 16 | }, 17 | 18 | "lcov.path": ["coverage/lcov.info"] 19 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "command": "gulp", 6 | "args": [ 7 | "--no-color" 8 | ], 9 | "tasks": [ 10 | { 11 | "label": "build", 12 | "type": "gulp", 13 | "task": "--no-color", 14 | "problemMatcher": [ 15 | "$lessCompile", 16 | "$tsc", 17 | "$jshint" 18 | ], 19 | "group": { 20 | "_id": "build", 21 | "isDefault": false 22 | } 23 | }, 24 | { 25 | "label": "cover:enable", 26 | "type": "gulp", 27 | "task": "--no-color", 28 | "problemMatcher": [] 29 | }, 30 | { 31 | "label": "cover:disable", 32 | "type": "gulp", 33 | "task": "--no-color", 34 | "problemMatcher": [] 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /.vscode/tasks.json.old: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "0.1.0", 5 | "command": "gulp", 6 | "isShellCommand": true, 7 | "args": [ 8 | "--no-color" 9 | ], 10 | "tasks": [ 11 | { 12 | "taskName": "build", 13 | "args": [], 14 | "isBuildCommand": true, 15 | "isBackground": false, 16 | "problemMatcher": [ 17 | "$lessCompile", 18 | "$tsc", 19 | "$jshint" 20 | ] 21 | }, 22 | { 23 | "taskName": "cover:enable", 24 | "args": [], 25 | "isBuildCommand": false, 26 | "isBackground": false 27 | }, 28 | { 29 | "taskName": "cover:disable", 30 | "args": [], 31 | "isBuildCommand": false, 32 | "isBackground": false 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | **/*.ts 3 | test/** 4 | **/*.map 5 | .gitignore 6 | tsconfig.json 7 | src/** 8 | tasks/** 9 | ossdbtoolsservice/** -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MySQL extension for Azure Data Studio 2 | 3 | Connect to, query, and manage MySQL databases with Azure Data Studio, a modern data editor available for Linux, MacOS, and Windows. This extension enables you to interact with MySQL using Azure Data Studio features like: 4 | 5 | * Connect to MySQL anywhere (on-premises, or VMs, on managed MySQL in other clouds or on Azure Database for MySQL - Flexible Server) 6 | * Use your preferred authentication methods (MySQL authentication or Azure Active Directory authentication) 7 | * Searchable object explorer view for database objects, with auto-completion 8 | * Query authoring and editing with Intellisense, syntax highlighting and code snippets 9 | * View query results and save to csv, JSON, xml, or Excel 10 | * Integrated terminal for Bash, PowerShell, and cmd.exe 11 | * Source control integration with Git 12 | * Customize dashboards and insight widgets using SQL 13 | * Server groups for organizing connections 14 | * Customizable keyboard shortcuts, multi-tab support, color theme options 15 | 16 | See our [quickstart] for a step-by-step guide to get started with MySQL using Azure Data Studio. 17 | 18 | ![Connection Dialog] 19 | 20 | ## Install the MySQL extension 21 | 22 | If you don't already have Azure Data Studio installed, see its [install instructions](https://learn.microsoft.com/sql/azure-data-studio/download-azure-data-studio). 23 | 24 | 1. Select the extensions icon from the sidebar in Azure Data Studio. 25 | 26 | 2. Search for the **MySQL** and select it. 27 | 28 | 3. Select **Install**. Once installed, select **Reload** to activate the extension in Azure Data Studio. 29 | 30 | ## Offline Installation 31 | 32 | The extension will download and install a required MySQL Tools Service package during activation. For machines with no Internet access, you can still use the extension by choosing the 33 | `Install from VSIX...` option in the Extension view and installing a bundled release from our [Releases] page. 34 | Each operating system has a .vsix file with the required service included. Pick the file for your OS, download and install to get started. 35 | We recommend you choose a full release and ignore any alpha or beta releases as these are our daily builds used in testing. 36 | 37 | ## Support 38 | 39 | Support for this extension is provided on our [GitHub Issue Tracker]. You can submit a [bug report], a [feature suggestion] or participate in discussions. 40 | 41 | ## Contributing to the Extension 42 | 43 | See the [developer documentation] for details on how to contribute to this extension. 44 | 45 | ## Code of Conduct 46 | 47 | This project has adopted the [Microsoft Open Source Code of Conduct]. For more information see the [Code of Conduct FAQ] or contact [opencode@microsoft.com] with any additional questions or comments. 48 | 49 | ## Telemetry 50 | 51 | This extension collects telemetry data, which is used to help understand how to improve the product. For example, this usage data helps to debug issues, such as slow start-up times, and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data and you can disable telemetry as described in the Azure Data Studio [disable telemetry reporting](https://github.com/Microsoft/azuredatastudio/wiki/How-to-Disable-Telemetry-Reporting#how-to-disable-telemetry-reporting) documentation. 52 | 53 | ## Privacy Statement 54 | 55 | To learn more about our Privacy Statement visit [this link](https://go.microsoft.com/fwlink/?LinkID=824704). 56 | 57 | ## License 58 | 59 | This extension is [licensed under the MIT License]. Please see the [third-party notices] file for additional copyright notices and license terms applicable to portions of the software. 60 | 61 | [quickstart]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/documentation/quickstart.md 62 | [extension manager icon]:https://user-images.githubusercontent.com/20936410/88838718-d0640b00-d18e-11ea-9f63-226c8acd030e.png 63 | [Releases]: https://github.com/Microsoft/azuredatastudio-mysql/releases 64 | [GitHub Issue Tracker]:https://github.com/Microsoft/azuredatastudio-mysql/issues 65 | [bug report]:https://github.com/Microsoft/azuredatastudio-mysql/issues/new?labels=bug 66 | [feature suggestion]:https://github.com/Microsoft/azuredatastudio-mysql/issues/new?labels=feature-request 67 | [developer documentation]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/documentation/developer_documentation.md 68 | [Microsoft Enterprise and Developer Privacy Statement]:https://go.microsoft.com/fwlink/?LinkId=786907&lang=en7 69 | [licensed under the MIT License]: https://github.com/Microsoft/azuredatastudio-mysql/blob/master/LICENSE 70 | [third-party notices]: https://github.com/Microsoft/azuredatastudio-mysql/blob/master/ThirdPartyNotices.txt 71 | [Microsoft Open Source Code of Conduct]:https://opensource.microsoft.com/codeofconduct/ 72 | [Code of Conduct FAQ]:https://opensource.microsoft.com/codeofconduct/faq/ 73 | [opencode@microsoft.com]:mailto:opencode@microsoft.com 74 | [Connection Dialog]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/images/connection-details-dialog.png 75 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /coverconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "enabled": false, 3 | "relativeSourcePath": "../src", 4 | "relativeCoverageDir": "../../coverage", 5 | "ignorePatterns": ["**/node_modules/**", "**/libs/**", "**/lib/**", "**/htmlcontent/**/*.js", "**/*.bundle.js"], 6 | "includePid": false, 7 | "reports": ["json"], 8 | "verbose": false 9 | } -------------------------------------------------------------------------------- /documentation/developer_documentation.md: -------------------------------------------------------------------------------- 1 | # Contributing to MySQL extension for Azure Data Studio 2 | 3 | There are many ways to contribute to this project: logging bugs, submitting pull requests, reporting issues, and creating suggestions. 4 | 5 | ## Build and Run From Source 6 | 7 | If you want to understand how extension works or want to debug an issue, you'll want to get the source, build it, and run the tool locally. 8 | 9 | ### Getting the sources 10 | 11 | ``` 12 | git clone https://github.com/Microsoft/azuredatastudio-mysql 13 | ``` 14 | 15 | ### Installing Prerequisites 16 | 17 | - [Git](https://git-scm.com) 18 | - [Node.JS](https://nodejs.org/en/about/releases/) `= v16.17.0` 19 | - [NPM](https://www.npmjs.com/get-npm) `= v8.15.0` 20 | - [Yarn](https://yarnpkg.com/en/), install by opening a Powershell window after installing Node and running `npm i -g yarn` 21 | - [Gulp](https://gulpjs.org/getting-started.html), install using `npm install --global gulp-cli` 22 | 23 | Finally, install all dependencies using `Yarn`: 24 | 25 | ``` 26 | yarn 27 | ``` 28 | 29 | ### Build MySQL extension 30 | 31 | After you have these tools installed, run the following commands to clone github repository, install dependencies, and compile source code: 32 | 33 | ```bash 34 | git clone https://github.com/Microsoft/azuredatastudio-mysql.git 35 | cd azuredatastudio-mysql 36 | yarn 37 | yarn run compile 38 | ``` 39 | 40 | ### Debug extension 41 | 42 | [Debugging extension with VS Code](https://github.com/Microsoft/azuredatastudio/wiki/Debugging-an-Extension-with-VS-Code) 43 | 44 | ### Packaging 45 | 46 | Install vsce by running `npm install -g vsce` to be able to be to create a vsix package 47 | 48 | - Create online package i.e. without installing pgtoolsservice `yarn run package` 49 | - Create offline package i.e. with pgtoolsservice installed `yarn run package-offline` 50 | 51 | ### Clean up build, npm modules and reset your local git repository to a clean state 52 | 53 | ```bash 54 | git clean -fxd 55 | ``` 56 | 57 | ## Development Workflow 58 | 59 | ### Debugging 60 | 61 | You can use VS Code to debug the MySQL extension on Azure Data Studio: 62 | 63 | #### Using VSCode 64 | 65 | [Debugging extension with VS Code](https://github.com/Microsoft/azuredatastudio/wiki/Debugging-an-Extension-with-VS-Code) 66 | 67 | ## Work Branches 68 | 69 | Even if you have push rights on the Microsoft/azuredatastudio-mysql repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your personal workflow cruft out of sight. 70 | 71 | ## Pull Requests 72 | 73 | Before we can accept a pull request from you, you'll need to sign a [[Contributor License Agreement (CLA)|Contributor-License-Agreement]]. It is an automated process and you only need to do it once. 74 | 75 | To enable us to quickly review and accept your pull requests, always create one pull request per issue and [link the issue in the pull request](https://github.com/blog/957-introducing-issue-mentions). Never merge multiple requests in one unless they have the same root cause. Be sure to follow our coding guidelines and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible. 76 | 77 | ### Where to Contribute 78 | 79 | Check out the [full issues list](https://github.com/Microsoft/azuredatastudio-mysql/issues) for a list of all potential areas for contributions. 80 | 81 | To improve the chances to get a pull request merged you should select an issue that is labelled with the [`help-wanted`](https://github.com/Microsoft/azuredatastudio-mysql/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or [`bug`](https://github.com/Microsoft/azuredatastudio-mysql/issues?q=is%3Aopen+is%3Aissue+label%3A%22bug%22) labels. If the issue you want to work on is not labelled with `help-wanted` or `bug`, you can start a conversation with the issue owner asking whether an external contribution will be considered. 82 | 83 | ## Suggestions 84 | 85 | We're also interested in your feedback for the future of MySQL extension for Azure Data Studio. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly. 86 | 87 | ## Discussion Etiquette 88 | 89 | In order to keep the conversation clear and transparent, please limit discussion to English and keep things on topic with the issue. Be considerate to others and try to be courteous and professional at all times. 90 | 91 | ## Microsoft Open Source Code of Conduct 92 | 93 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 94 | -------------------------------------------------------------------------------- /documentation/quickstart.md: -------------------------------------------------------------------------------- 1 | # Quickstart: Use Azure Data Studio to connect and query MySQL 2 | 3 | This quickstart shows how to use Azure Data Studio to connect to a MySQL server (hosted on-premises, on VMs, on managed MySQL in other clouds or on Azure Database for MySQL - Flexible Server), create a database, and use SQL statements to insert and query data in the database. 4 | 5 | ## Prerequisites 6 | 7 | To complete this quickstart, you need Azure Data Studio, the MySQL extension for Azure Data Studio, and access to a MySQL server. 8 | 9 | - [Install Azure Data Studio](https://learn.microsoft.com/sql/azure-data-studio/download-azure-data-studio). 10 | - A MySQL server. You can either create a managed MySQL server on Azure using [Azure Database for MySQL - Flexible Server](https://learn.microsoft.com/azure/mysql/flexible-server/quickstart-create-server-portal.md) or [install MySQL locally](https://dev.mysql.com/downloads/mysql/). 11 | 12 | ## Install the MySQL extension for Azure Data Studio 13 | 14 | 1. Select the extensions icon from the sidebar in Azure Data Studio. 15 | 16 | ![extension manager icon] 17 | 18 | 2. Search for the **MySQL** extension and select it. 19 | 20 | 3. Select **Install** to add the extension. Once installed, select **Reload** to enable the extension in Azure Data Studio (only required when installing an extension for the first time). 21 | 22 | ## Connect to MySQL 23 | 24 | 1. Start **Azure Data Studio**. 25 | 26 | 2. The first time you start Azure Data Studio the **Connection** dialog opens. If the **Connection** dialog doesn't open, click the **New Connection** icon on the **Servers** view in the **Connections** tab: 27 | 28 | ![New Connection Icon] 29 | 30 | 3. In the dialog window that pops up, go to **Connection type** and select **MySQL** from the drop-down. 31 | 32 | 4. Enter your MySQL server name, select your preferred authentication method and enter the credentials to connect to your MySQL server: 33 | 34 | ![New Connection Screen] 35 | 36 | | Setting | Example value | Description | 37 | | ------------ | ------------------ | ------------------------------------------------- | 38 | | **Server name** | localhost / exampleserver.mysql.database.azure.con | The fully qualified server name. | 39 | | **Authentication type** | Password | The authentication method for accessing your MySQL server. This option lets you choose between MySQL native authentication (Password) and Azure Active Directory authentication.| 40 | | **User name** | exampleuser | The user name you want to log in with. | 41 | | **Password** | *password* | The password for the account you are logging in with. | 42 | | **Remember Password** | *Check* | Check this box if you don't want to enter the password each time you connect. | 43 | | **Database name** | \ | Enter a database name if you want the connection to specify a database. | 44 | | **Server group** | \ | This option lets you assign this connection to a specific server group you create. | 45 | | **Name (optional)** | *leave blank* | This option lets you specify a friendly name for your server. | 46 | 47 | 5. If your MySQL server requires SSL encryptions, navigate to **Advanced Properties** window by selecting **Advanced...** button, enter the SSL configuration details and select **OK**. By default, SSL mode is configured as *Require*. For more details on SSL encryption and modes, see [Configuring MySQL to Use Encrypted Connections](https://dev.mysql.com/doc/refman/8.0/en/using-encrypted-connections.html). 48 | 49 | 6. Review the connection details and select **Connect**. 50 | 51 | Once a successful connection is established, your server opens in the **SERVERS** sidebar. 52 | 53 | ## Create a database 54 | 55 | The following steps will create a database named **tutorialdb**: 56 | 57 | 1. Right-click on your MySQL server in the **SERVERS** sidebar and select **New Query**. 58 | 59 | 2. Paste this SQL statement in the query editor that opens up. 60 | 61 | ```sql 62 | CREATE DATABASE tutorialdb; 63 | ``` 64 | 65 | 3. From the toolbar select **Run** to execute the query. Notifications appear in the **MESSAGES** pane to show query progress. 66 | 67 | >[!TIP] 68 | > You can use **F5** on your keyboard to execute the statement instead of using **Run**. 69 | 70 | fter the query completes, right-click **Databases** under your MySQL server in the **SERVERS** sidebar, and select **Refresh** to see **tutorialdb** listed under the **Databases** node. 71 | 72 | ## Create a table 73 | 74 | The following steps will create a table in the **tutorialdb**: 75 | 76 | 1. Change the connection context to **tutorialdb** using the drop-down in the query editor. 77 | 78 | ![Change context] 79 | 80 | 2. Paste the following SQL statement into the query editor and click **Run**. 81 | 82 | > [!NOTE] 83 | > You can either append this or overwrite the existing query in the editor. Clicking **Run** executes only the query that is highlighted. If nothing is highlighted, clicking **Run** executes all queries in the editor. 84 | 85 | ```sql 86 | -- Drop the table if it already exists 87 | DROP TABLE IF EXISTS customers; 88 | -- Create a new table called 'customers' 89 | CREATE TABLE customers( 90 | customer_id SERIAL PRIMARY KEY, 91 | name VARCHAR (50) NOT NULL, 92 | location VARCHAR (50) NOT NULL, 93 | email VARCHAR (50) NOT NULL 94 | ); 95 | ``` 96 | 97 | ## Insert data 98 | 99 | Paste the following snippet into the query window and click **Run**: 100 | 101 | ```sql 102 | -- Insert rows into table 'customers' 103 | INSERT INTO customers 104 | (customer_id, name, location, email) 105 | VALUES 106 | ( 1, 'Orlando', 'Australia', ''), 107 | ( 2, 'Keith', 'India', 'keith0@adventure-works.com'), 108 | ( 3, 'Donna', 'Germany', 'donna0@adventure-works.com'), 109 | ( 4, 'Janet', 'United States','janet1@adventure-works.com'); 110 | ``` 111 | 112 | ## Query data 113 | 114 | 1. Paste the following snippet into the query editor and select **Run**: 115 | 116 | ```sql 117 | -- Select rows from table 'customers' 118 | SELECT * FROM customers; 119 | ``` 120 | 121 | 2. The results of the query are displayed: 122 | 123 | ![View results] 124 | 125 | Alternatively, in the **SERVERS** sidebar, navigate down to the **customers** table, right-click on the table and select **Select Top 1000** to query the data. 126 | 127 | ## Next Steps 128 | 129 | Learn about the [scenarios available] for MySQL in Azure Data Studio. 130 | 131 | [scenarios available]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/README.md 132 | [Offline Installation]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/README.md#Offline-Installation 133 | 134 | [extension manager icon]:https://user-images.githubusercontent.com/20936410/88838718-d0640b00-d18e-11ea-9f63-226c8acd030e.png 135 | [New Connection Icon]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/images/new-connection.png 136 | [New Connection Screen]:https://github.com/microsoft/azuredatastudio-mysql/blob/main/images/connection-details-dialog.png 137 | [Change Context]:https://user-images.githubusercontent.com/102506628/193454241-d50169e6-88a6-4874-b78f-de9f3fd21b71.PNG 138 | [View Results]:https://user-images.githubusercontent.com/102506628/193454261-aaed735f-0fb6-4f2d-b494-33923fac99d0.PNG 139 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | "use strict" 2 | var gulp = require('gulp'); 3 | var rename = require('gulp-rename'); 4 | var tslint = require('gulp-tslint'); 5 | var ts = require('gulp-typescript'); 6 | var tsProject = ts.createProject('tsconfig.json'); 7 | var del = require('del'); 8 | var srcmap = require('gulp-sourcemaps'); 9 | var config = require('./tasks/config'); 10 | var cproc = require('child_process'); 11 | var nls = require('vscode-nls-dev'); 12 | const path = require('path'); 13 | const es = require('event-stream'); 14 | require('./tasks/packagetasks') 15 | 16 | const languages = [ 17 | { id: 'zh-tw', folderName: 'cht', localeId: 'zh-Hant'}, 18 | { id: 'zh-cn', folderName: 'chs', localeId: 'zh-Hans'}, 19 | { id: 'ja', folderName: 'jpn' }, 20 | { id: 'ko', folderName: 'kor' }, 21 | { id: 'de', folderName: 'deu' }, 22 | { id: 'fr', folderName: 'fra' }, 23 | { id: 'es', folderName: 'esn' }, 24 | { id: 'ru', folderName: 'rus' }, 25 | { id: 'it', folderName: 'ita' }, 26 | { id: 'pt-BR', folderName: 'ptb'} 27 | ]; 28 | 29 | const cleanTask = function() { 30 | return del(['out/**', 'package.nls.*.json']); 31 | } 32 | 33 | const addI18nTask = function() { 34 | return gulp.src(['package.nls.json']) 35 | .pipe(nls.createAdditionalLanguageFiles(languages, 'i18n')) 36 | .pipe(gulp.dest('.')); 37 | }; 38 | 39 | // Creates an xlf file containing all the localized strings. This file is picked by translation pipeline. 40 | const exporti18n = function() { 41 | return gulp.src(['package.nls.json', 'out/nls.metadata.header.json', 'out/nls.metadata.json']) 42 | .pipe(nls.createXlfFiles("l10n", "l10n")) 43 | .pipe(gulp.dest(path.join('src'))); 44 | }; 45 | 46 | // Use the returned xlf files for all languages and fill i18n dir with respective lang files in respective lang dir. 47 | const importi18n = function() { 48 | return Promise.resolve(es.merge(languages.map(language => { 49 | let languageId = language.localeId || language.id; 50 | return gulp.src(`src/l10n/transXlf/l10n.${languageId}.xlf`, { allowEmpty: true }) 51 | .pipe(nls.prepareJsonFiles()) 52 | .pipe(gulp.dest(path.join('./i18n', language.folderName))); 53 | }))); 54 | } 55 | 56 | // generate metadata containing all localized files in src directory, to be used later by exporti18n task to create an xlf file. 57 | gulp.task('generate-metadata', (done) => { 58 | return gulp.src([ 59 | config.paths.project.root + '/src/**/*.ts', 60 | config.paths.project.root + '/src/**/*.js']) 61 | .pipe(srcmap.init()) 62 | .pipe(tsProject()) 63 | .on('error', function() { 64 | if (process.env.BUILDMACHINE) { 65 | done('Extension Tests failed to build. See Above.'); 66 | process.exit(1); 67 | } 68 | }) 69 | .pipe(nls.rewriteLocalizeCalls()) 70 | .pipe(nls.bundleMetaDataFiles('mysql-extension', 'out')) 71 | .pipe(nls.bundleLanguageFiles()) 72 | .pipe(srcmap.write('.', { 73 | sourceRoot: function(file){ return file.cwd + '/src'; } 74 | })) 75 | .pipe(gulp.dest('out/')); 76 | }); 77 | 78 | gulp.task('ext:lint', () => { 79 | return gulp.src([ 80 | config.paths.project.root + '/src/**/*.ts', 81 | '!' + config.paths.project.root + '/src/**/*.d.ts', 82 | config.paths.project.root + '/test/**/*.ts' 83 | ]) 84 | .pipe((tslint({ 85 | formatter: "verbose" 86 | }))) 87 | .pipe(tslint.report()); 88 | }); 89 | 90 | gulp.task('ext:compile-src', (done) => { 91 | return gulp.src([ 92 | config.paths.project.root + '/src/**/*.ts', 93 | config.paths.project.root + '/src/**/*.js']) 94 | .pipe(srcmap.init()) 95 | .pipe(tsProject()) 96 | .on('error', function() { 97 | if (process.env.BUILDMACHINE) { 98 | done('Extension Tests failed to build. See Above.'); 99 | process.exit(1); 100 | } 101 | }) 102 | .pipe(nls.rewriteLocalizeCalls()) 103 | .pipe(nls.createAdditionalLanguageFiles(languages, 'i18n', 'out')) 104 | .pipe(srcmap.write('.', { 105 | sourceRoot: function(file){ return file.cwd + '/src'; } 106 | })) 107 | .pipe(gulp.dest('out/')); 108 | }); 109 | 110 | gulp.task('ext:compile-tests', (done) => { 111 | return gulp.src([ 112 | config.paths.project.root + '/test/**/*.ts', 113 | config.paths.project.root + '/typings/**/*.ts']) 114 | .pipe(srcmap.init()) 115 | .pipe(tsProject()) 116 | .on('error', function() { 117 | if (process.env.BUILDMACHINE) { 118 | done('Extension Tests failed to build. See Above.'); 119 | process.exit(1); 120 | } 121 | }) 122 | .pipe(srcmap.write('.', { 123 |            sourceRoot: function(file){ return file.cwd + '/test'; } 124 |        })) 125 | .pipe(gulp.dest('out/test/')); 126 | 127 | }); 128 | 129 | gulp.task('ext:localize', gulp.series(cleanTask, 'generate-metadata', exporti18n)); 130 | 131 | gulp.task('ext:compile', gulp.series(importi18n, cleanTask, 'ext:compile-src', addI18nTask, 'ext:compile-tests')); 132 | 133 | gulp.task('ext:copy-tests', () => { 134 | return gulp.src(config.paths.project.root + '/test/resources/**/*') 135 | .pipe(gulp.dest(config.paths.project.root + '/out/test/resources/')) 136 | }); 137 | 138 | gulp.task('ext:copy-config', () => { 139 | var env = process.env.VsMsSqlEnv; 140 | env = env == undefined ? "dev" : env; 141 | return gulp.src(config.paths.project.root + '/src/config.json') 142 | .pipe(rename('config.json')) 143 | .pipe(gulp.dest(config.paths.project.root + '/out/')); 144 | }); 145 | 146 | gulp.task('ext:copy-js', () => { 147 | return gulp.src([ 148 | config.paths.project.root + '/src/**/*.js', 149 | '!' + config.paths.project.root + '/src/views/htmlcontent/**/*']) 150 | .pipe(gulp.dest(config.paths.project.root + '/out/')) 151 | }); 152 | 153 | gulp.task('ext:copy', gulp.series('ext:copy-tests', 'ext:copy-js', 'ext:copy-config')); 154 | 155 | gulp.task('ext:build', gulp.series('ext:compile', 'ext:copy')); 156 | 157 | gulp.task('ext:test', (done) => { 158 | let workspace = process.env['WORKSPACE']; 159 | if (!workspace) { 160 | workspace = process.cwd(); 161 | } 162 | process.env.JUNIT_REPORT_PATH = workspace + '/test-reports/ext_xunit.xml'; 163 | cproc.exec(`code --extensionDevelopmentPath="${workspace}" --extensionTestsPath="${workspace}/out/test" --verbose`, (error, stdout, stderr) => { 164 | if (error) { 165 | console.error(`exec error: ${error}`); 166 | process.exit(1); 167 | } 168 | console.log(`stdout: ${stdout}`); 169 | console.log(`stderr: ${stderr}`); 170 | done(); 171 | }); 172 | }); 173 | 174 | gulp.task('test', gulp.series('ext:test')); 175 | 176 | require('./tasks/covertasks'); 177 | 178 | gulp.task('clean', function (done) { 179 | return del('out', done); 180 | }); 181 | 182 | gulp.task('build', gulp.series('clean', 'ext:build')); 183 | 184 | gulp.task('watch', function(){ 185 | return gulp.watch(config.paths.project.root + '/src/**/*', gulp.series('build')) 186 | }); 187 | -------------------------------------------------------------------------------- /i18n/chs/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "将架构关联到当前项目中的 JSON 文件", 8 | "json.schemas.url.desc": "架构的 URL 或当前目录中架构的相对路径", 9 | "json.schemas.fileMatch.desc": "将 JSON 文件解析到架构时用于匹配的一组文件模式。", 10 | "json.schemas.fileMatch.item.desc": "将 JSON 文件解析到架构时用于匹配的可以包含 \"*\" 的文件模式。", 11 | "json.schemas.schema.desc": "给定 URL 的架构定义。仅当要避免访问架构 URL 时需要提供架构。", 12 | "json.format.enable.desc": "启用/禁用默认 JSON 格式化程序(需要重启)", 13 | "mysql.description": "适用于 Azure Data Studio 的 MySQL 扩展", 14 | "mysql.logDebugInfo.description": "[可选] 将调试输出记录到 VS Code 控制台(“帮助”->“切换开发人员工具”)", 15 | "mysql.configuration.title": "MySQL 配置", 16 | "mysql.enabled.description": "[可选] 启用 MySQL 支持(当前处于开发状态)", 17 | "mysql.debugSourcePath.description": "[可选] MySQL 工具服务源目录的路径,用于调试", 18 | "mysql.useDebugSource.description": "[可选] 通过在 MySQL.debugSourcePath 中设置的路径启用运行 MySQL 扩展", 19 | "mysql.enableStartupDebugging.description": "[可选] 是否将 MySQL 工具服务设置为在启动时等待调试器附加", 20 | "mysql.debugServerPort.description": "[可选] 要运行 MySQL 工具服务远程调试器的端口(默认值为 3000)", 21 | "mysql.defaultDatabase.description": "创建新的 MySQL 连接时要使用的默认数据库", 22 | "mysql.format.keywordCase.description": "[可选] 更改关键字的格式设置方式。允许的值为“大写”、“小写”和“首字母大写”。", 23 | "mysql.format.identifierCase.description": "[可选] 更改标识符的格式设置方式。允许的值为“大写”、“小写”和“首字母大写”。", 24 | "mysql.format.stripComments.description": "[可选] 如果为 true,则从语句中移除注释", 25 | "mysql.format.reindent.description": "[可选] 如果为 true,则更改语句的缩进。", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "源", 28 | "mysql.connectionOptions.groupName.security": "安全性", 29 | "mysql.connectionOptions.groupName.server": "服务器", 30 | "mysql.connectionOptions.groupName.client": "客户端", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "名称(可选)", 33 | "mysql.connectionOptions.connectionName.description": "连接的自定义名称", 34 | "mysql.connectionOptions.host.displayName": "服务器名称", 35 | "mysql.connectionOptions.host.description": "MySQL 服务器的名称", 36 | "mysql.connectionOptions.authenticationType.displayName": "身份验证类型", 37 | "mysql.connectionOptions.authenticationType.description": "如何向服务器进行身份验证。", 38 | "mysql.connectionOptions.authenticationType.password": "密码", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "数据库名称", 41 | "mysql.connectionOptions.dbname.description": "数据源中的初始目录或数据库的名称。", 42 | "mysql.connectionOptions.user.displayName": "用户名", 43 | "mysql.connectionOptions.user.description": "指示连接到数据源时使用的用户 ID", 44 | "mysql.connectionOptions.password.displayName": "密码", 45 | "mysql.connectionOptions.password.description": "指示连接到数据源时使用的密码", 46 | "mysql.connectionOptions.port.displayName": "端口", 47 | "mysql.connectionOptions.port.description": "服务器端口号", 48 | "mysql.connectionOptions.connectTimeout.displayName": "连接超时", 49 | "mysql.connectionOptions.connectTimeout.description": "连接时超时之前要等待的秒数", 50 | "mysql.connectionOptions.clientFlag.displayName": "功能标志", 51 | "mysql.connectionOptions.clientFlag.description": "要发送到 MySQL 服务器的自定义标志", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "要使用的默认 SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "SSL 模式", 55 | "mysql.connectionOptions.ssl.description": "连接时要使用的 SSL 模式", 56 | "mysql.connectionOptions.ssl.mode.disable": "禁用", 57 | "mysql.connectionOptions.ssl.mode.require": "需要", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "SSL 密钥", 61 | "mysql.connectionOptions.ssl.key.description": "用于 SSL 证书的客户端私钥的路径名称", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL 客户端证书", 63 | "mysql.connectionOptions.ssl.cert.description": "SSL 客户端证书文件的路径", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL CA 证书", 65 | "mysql.connectionOptions.ssl.ca.description": "SSL CA 证书文件的路径", 66 | "mysql.resourceDeployment.displayName": "Azure Database for MySQL", 67 | "mysql.resourceDeployment.description": "创建 Azure Database for MySQL 灵活服务器 - Azure 上完全托管的 MySQL 数据库即服务。", 68 | "mysql.resourceDeployment.okButtonText": "在 Azure 门户中创建", 69 | "mysql.resourceDeployment.agreements.template": "我接受 {0} 和 {1}。", 70 | "mysql.resourceDeployment.helpTexts.template": "Azure Database for MySQL 灵活服务器是由 MySQL 社区版提供支持的关系数据库服务。它是一种完全托管的数据库即服务产品,可通过可预测的性能和动态可伸缩性处理任务关键型工作负载。此外,它旨在实现对数据库管理功能和配置设置的更精细和更灵活的控制。{0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure 使用条款", 72 | "microsoft.privacy.statement": "Microsoft 隐私声明", 73 | "learnMore": "了解详细信息。", 74 | "mysql.createDatabase": "新建数据库" 75 | } -------------------------------------------------------------------------------- /i18n/cht/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "在結構描述與目前專案的 JSON 檔案之間建立關聯", 8 | "json.schemas.url.desc": "目前目錄中的結構描述 URL 或結構描述相對路徑", 9 | "json.schemas.fileMatch.desc": "檔案模式陣列,在將 JSON 檔案解析成結構描述時的比對對象。", 10 | "json.schemas.fileMatch.item.desc": "可包含 '*' 的檔案模式,在將 JSON 檔案解析成結構描述時的比對對象。", 11 | "json.schemas.schema.desc": "指定 URL 的結構描述定義。只須提供結構描述以避免存取結構描述 URL。", 12 | "json.format.enable.desc": "啟用/停用預設 JSON 格式器 (需要重新啟動)", 13 | "mysql.description": "適用於 Azure Data Studio 的 MySQL 延伸模組", 14 | "mysql.logDebugInfo.description": "[Optional] 在 VS Code 主控台中記錄偵錯輸出 (說明 -> 切換開發人員工具)", 15 | "mysql.configuration.title": "MySQL 設定", 16 | "mysql.enabled.description": "[選擇性] 啟用 MySQL 支援 (目前正在開發中)", 17 | "mysql.debugSourcePath.description": "[選擇性] MySQL 工具服務的來源目錄路徑,用於進行偵錯", 18 | "mysql.useDebugSource.description": "[選擇性] 透過 MySQL.debugSourcePath 中設定的路徑,啟用 MySQL 延伸模組的執行", 19 | "mysql.enableStartupDebugging.description": "[選擇性] 是否要讓 MySQL 工具服務在啟動時等候偵錯工具連結", 20 | "mysql.debugServerPort.description": "[選擇性] 要在其上執行 MySQL 工具服務遠端偵錯程式的連接埠 (預設為 3000)", 21 | "mysql.defaultDatabase.description": "建立新的 MySQL 連線時要使用的預設資料庫", 22 | "mysql.format.keywordCase.description": "[選擇性] 變更關鍵字的格式。允許的值為 'upper', 'lower' 和 'capitalize'。", 23 | "mysql.format.identifierCase.description": "[選擇性] 變更識別碼的格式。允許的值為 'upper', 'lower' 和 'capitalize'。", 24 | "mysql.format.stripComments.description": "[選擇性] 如果為 True,則會從陳述式中移除註解", 25 | "mysql.format.reindent.description": "[選擇性] 如果為 True,則會變更陳述式的縮排。", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "來源", 28 | "mysql.connectionOptions.groupName.security": "安全性", 29 | "mysql.connectionOptions.groupName.server": "伺服器", 30 | "mysql.connectionOptions.groupName.client": "用戶端", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "名稱 (選用)", 33 | "mysql.connectionOptions.connectionName.description": "連線的自訂名稱", 34 | "mysql.connectionOptions.host.displayName": "伺服器名稱", 35 | "mysql.connectionOptions.host.description": "MySQL 伺服器的名稱", 36 | "mysql.connectionOptions.authenticationType.displayName": "驗證類型", 37 | "mysql.connectionOptions.authenticationType.description": "如何向伺服器驗證", 38 | "mysql.connectionOptions.authenticationType.password": "密碼", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "資料庫名稱", 41 | "mysql.connectionOptions.dbname.description": "資料來源中初始目錄或資料庫的名稱。", 42 | "mysql.connectionOptions.user.displayName": "使用者名稱", 43 | "mysql.connectionOptions.user.description": "代表要在連線至資料來源時使用的使用者識別碼", 44 | "mysql.connectionOptions.password.displayName": "密碼", 45 | "mysql.connectionOptions.password.description": "代表要在連線至資料來源時使用的密碼", 46 | "mysql.connectionOptions.port.displayName": "連接埠", 47 | "mysql.connectionOptions.port.description": "伺服器的連接埠號碼", 48 | "mysql.connectionOptions.connectTimeout.displayName": "連線逾時", 49 | "mysql.connectionOptions.connectTimeout.description": "連線逾時前要等待的秒數", 50 | "mysql.connectionOptions.clientFlag.displayName": "功能旗標", 51 | "mysql.connectionOptions.clientFlag.description": "要傳送到 MySQL 伺服器的自訂旗標", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "要使用的預設 SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "SSL 模式", 55 | "mysql.connectionOptions.ssl.description": "連線時要使用的 SSL 模式", 56 | "mysql.connectionOptions.ssl.mode.disable": "停用", 57 | "mysql.connectionOptions.ssl.mode.require": "必要", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "SSL 金鑰", 61 | "mysql.connectionOptions.ssl.key.description": "要用於 SSL 憑證的用戶端私密金鑰路徑名稱", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL 用戶端憑證", 63 | "mysql.connectionOptions.ssl.cert.description": "SSL 用戶端憑證檔案的路徑", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL CA 憑證", 65 | "mysql.connectionOptions.ssl.ca.description": "SSL 用戶端憑證檔案的路徑", 66 | "mysql.resourceDeployment.displayName": "MySQL 的 Azure 資料庫", 67 | "mysql.resourceDeployment.description": "建立適用於 MySQL 的 Azure 資料庫彈性伺服器 - 完全受控的 MySQL 資料庫,作為 Azure 上的服務。", 68 | "mysql.resourceDeployment.okButtonText": "在 Azure 入口網站中建立", 69 | "mysql.resourceDeployment.agreements.template": "我接受{0}和{1}。", 70 | "mysql.resourceDeployment.helpTexts.template": "適用於 MySQL 的 Azure 資料庫彈性伺服器是由 MySQL 社群版本所提供的關聯式資料庫服務。這是完全受控的資料庫,作為服務供應項目,可處理具有可預測效能和動態可擴縮性的任務關鍵工作負載。此外,它的設計目的是針對資料庫管理功能和組態設定進行更細微的控制與彈性。{0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure 使用規定", 72 | "microsoft.privacy.statement": "Microsoft 隱私權聲明", 73 | "learnMore": "深入了解。", 74 | "mysql.createDatabase": "新增資料庫" 75 | } -------------------------------------------------------------------------------- /i18n/deu/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Hiermit werden Schemas zu JSON-Dateien im aktuellen Projekt zugeordnet.", 8 | "json.schemas.url.desc": "Eine URL zu einem Schema oder ein relativer Pfad zu einem Schema im aktuellen Verzeichnis", 9 | "json.schemas.fileMatch.desc": "Ein Array aus Dateimustern zum Abgleich beim Auflösen von JSON-Dateien in Schemas", 10 | "json.schemas.fileMatch.item.desc": "Ein Dateimuster, das \"*\" enthalten kann, zum Abgleich beim Auflösen von JSON-Dateien in Schemas", 11 | "json.schemas.schema.desc": "Die Schemadefinition für die angegebene URL. Das Schema muss nur angegeben werden, um Zugriffe auf die Schema-URL zu vermeiden.", 12 | "json.format.enable.desc": "Standard-JSON-Formatierer aktivieren/deaktivieren (Neustart erforderlich)", 13 | "mysql.description": "MySQL-Erweiterung für Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Optional] Protokollieren Sie die Debugausgabe in der VS Code-Konsole (Hilfe > Entwicklertools umschalten).", 15 | "mysql.configuration.title": "MySQL-Konfiguration", 16 | "mysql.enabled.description": "[Optional] Aktivieren Sie die MySQL-Unterstützung (derzeit in der Entwicklung).", 17 | "mysql.debugSourcePath.description": "[Optional] Pfad zum Quellverzeichnis des MySQL-Toolsdiensts zum Debuggen", 18 | "mysql.useDebugSource.description": "[Optional] Aktivieren Sie die Ausführung der MySQL-Erweiterung über den in „MySQL.debugSourcePath“ festgelegten Pfad.", 19 | "mysql.enableStartupDebugging.description": "[Optional] Gibt an, ob der MySQL-Toolsdienst beim Starten auf das Anfügen eines Debuggers warten soll", 20 | "mysql.debugServerPort.description": "[Optional] Der Port, an dem der Remotedebugger des MySQL-Toolsdiensts ausgeführt werden soll (Standard: 3000)", 21 | "mysql.defaultDatabase.description": "Die Standarddatenbank, die beim Erstellen einer neuen MySQL-Verbindung verwendet werden soll", 22 | "mysql.format.keywordCase.description": "[Optional] Ändert, wie Schlüsselwörter formatiert werden. Zulässige Werte sind „upper“, „lower“ und „capitalize“.", 23 | "mysql.format.identifierCase.description": "[Optional] Ändert, wie Bezeichner formatiert werden. Zulässige Werte sind „upper“, „lower“ und „capitalize“.", 24 | "mysql.format.stripComments.description": "[Optional] Bei „wahr“ werden Kommentare aus den Anweisungen entfernt.", 25 | "mysql.format.reindent.description": "[Optional] Bei „wahr“ werden die Einzüge der Anweisungen geändert.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Quelle", 28 | "mysql.connectionOptions.groupName.security": "Sicherheit", 29 | "mysql.connectionOptions.groupName.server": "Server", 30 | "mysql.connectionOptions.groupName.client": "Client", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Name (optional)", 33 | "mysql.connectionOptions.connectionName.description": "Benutzerdefinierter Name der Verbindung", 34 | "mysql.connectionOptions.host.displayName": "Servername", 35 | "mysql.connectionOptions.host.description": "Name des MySQL-Servers", 36 | "mysql.connectionOptions.authenticationType.displayName": "Authentifizierungstyp", 37 | "mysql.connectionOptions.authenticationType.description": "So authentifizieren Sie sich beim Server", 38 | "mysql.connectionOptions.authenticationType.password": "Kennwort", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Datenbankname", 41 | "mysql.connectionOptions.dbname.description": "Der Name des Anfangskatalogs oder der Anfangsdatenbank in der Datenquelle", 42 | "mysql.connectionOptions.user.displayName": "Benutzername", 43 | "mysql.connectionOptions.user.description": "Gibt die Benutzer-ID an, die beim Herstellen einer Verbindung mit der Datenquelle verwendet werden soll.", 44 | "mysql.connectionOptions.password.displayName": "Kennwort", 45 | "mysql.connectionOptions.password.description": "Gibt das Kennwort an, das beim Herstellen einer Verbindung mit der Datenquelle verwendet werden soll.", 46 | "mysql.connectionOptions.port.displayName": "Port", 47 | "mysql.connectionOptions.port.description": "Portnummer für den Server", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Verbindungstimeout", 49 | "mysql.connectionOptions.connectTimeout.description": "Sekunden, die gewartet werden müssen, bevor beim Herstellen der Verbindung ein Timeout auftritt", 50 | "mysql.connectionOptions.clientFlag.displayName": "Funktionsflags", 51 | "mysql.connectionOptions.clientFlag.description": "Benutzerdefinierte Flags, die an den MySQL-Server gesendet werden sollen", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "Zu verwendender Standard-SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "SSL-Modus", 55 | "mysql.connectionOptions.ssl.description": "Der SSL-Modus, der beim Herstellen einer Verbindung verwendet werden soll", 56 | "mysql.connectionOptions.ssl.mode.disable": "Deaktivieren", 57 | "mysql.connectionOptions.ssl.mode.require": "Anfordern", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "SSL-Schlüssel", 61 | "mysql.connectionOptions.ssl.key.description": "Der Pfadname des privaten Clientschlüssels, der für das SSL-Zertifikat verwendet werden soll", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL-Clientzertifikat", 63 | "mysql.connectionOptions.ssl.cert.description": "Der Pfad der SSL-Clientzertifikatdatei", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL-ZS-Zertifikat", 65 | "mysql.connectionOptions.ssl.ca.description": "Der Pfad der SSL-ZS-Zertifikatsdatei", 66 | "mysql.resourceDeployment.displayName": "Azure Database for MySQL", 67 | "mysql.resourceDeployment.description": "Erstellen Sie einen flexiblen Azure Database for MySQL-Server – eine vollständig verwaltete MySQL-Datenbank als Dienst in Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Im Azure-Portal erstellen", 69 | "mysql.resourceDeployment.agreements.template": "Ich akzeptiere die {0} und {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "Der flexible Azure Database for MySQL-Server ist ein relationaler Datenbankdienst, der von der MySQL Community Edition unterstützt wird. Es handelt sich um ein vollständig verwaltetes Database-as-a-Service-Angebot, das unternehmenskritische Workloads mit vorhersagbarer Leistung und dynamischer Skalierbarkeit verarbeiten kann. Darüber hinaus ermöglicht er eine genauere Kontrolle und Flexibilität der Datenbankverwaltungsfunktionen und Konfigurationseinstellungen. {0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure-Nutzungsbedingungen", 72 | "microsoft.privacy.statement": "Microsoft-Datenschutzbestimmungen", 73 | "learnMore": "Weitere Informationen.", 74 | "mysql.createDatabase": "Neue Datenbank" 75 | } -------------------------------------------------------------------------------- /i18n/esn/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Asociar esquemas a archivos JSON en el proyecto actual", 8 | "json.schemas.url.desc": "Una dirección URL a un esquema o una ruta de acceso relativa a un esquema en el directorio actual", 9 | "json.schemas.fileMatch.desc": "Una matriz de patrones de archivo con los cuales coincidir cuando los archivos JSON se resuelvan en esquemas.", 10 | "json.schemas.fileMatch.item.desc": "Un patrón de archivo que puede contener \"*\" con el cual coincidir cuando los archivos JSON se resuelvan en esquemas.", 11 | "json.schemas.schema.desc": "La definición de esquema de la dirección URL determinada. Solo se necesita proporcionar el esquema para evitar los accesos a la dirección URL del esquema.", 12 | "json.format.enable.desc": "Habilitar/deshabilitar formateador JSON predeterminado (requiere reiniciar)", 13 | "mysql.description": "Extensión MySQL para Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Opcional] Registre la salida de depuración en la consola de VS Code (Ayuda -> Alternar herramientas de desarrollo).", 15 | "mysql.configuration.title": "Configuración de MySQL", 16 | "mysql.enabled.description": "[Opcional] Habilitar la compatibilidad con MySQL (actualmente en desarrollo)", 17 | "mysql.debugSourcePath.description": "[Optional] Ruta de acceso al directorio de origen de MySQL Tools Service para la depuración", 18 | "mysql.useDebugSource.description": "[Optional] Habilitar la ejecución de la extensión MySQL mediante la ruta de acceso establecida en MySQL.debugSourcePath", 19 | "mysql.enableStartupDebugging.description": "[Opcional] Indica si MySQL Tools Service espera a que se adjunte un depurador al iniciar", 20 | "mysql.debugServerPort.description": "[Optional] Puerto en el que se ejecutará el depurador remoto de MySQL Tools Service (valor predeterminado: 3000)", 21 | "mysql.defaultDatabase.description": "Base de datos predeterminada que se va a usar al crear una nueva conexión de MySQL.", 22 | "mysql.format.keywordCase.description": "[Optional] Cambia el formato de las palabras clave. Los valores permitidos son \"upper\", \"lower\" y \"capitalize\".", 23 | "mysql.format.identifierCase.description": "[Optional] Cambia el formato de los identificadores. Los valores permitidos son \"upper\", \"lower\" y \"capitalize\".", 24 | "mysql.format.stripComments.description": "[Opcional] Si el valor es true, se quitan los comentarios de las instrucciones", 25 | "mysql.format.reindent.description": "[Opcional] Si el valor es true, se cambian las sangrías de las instrucciones.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Fuente", 28 | "mysql.connectionOptions.groupName.security": "Seguridad", 29 | "mysql.connectionOptions.groupName.server": "Servidor", 30 | "mysql.connectionOptions.groupName.client": "Cliente", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Nombre (opcional)", 33 | "mysql.connectionOptions.connectionName.description": "Nombre personalizado de la conexión", 34 | "mysql.connectionOptions.host.displayName": "Nombre del servidor", 35 | "mysql.connectionOptions.host.description": "Nombre del servidor MySQL", 36 | "mysql.connectionOptions.authenticationType.displayName": "Tipo de autenticación", 37 | "mysql.connectionOptions.authenticationType.description": "Cómo realizar la autenticación con el servidor", 38 | "mysql.connectionOptions.authenticationType.password": "Contraseña", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Nombre de la base de datos", 41 | "mysql.connectionOptions.dbname.description": "Nombre del catálogo o base de datos inicial del origen de datos", 42 | "mysql.connectionOptions.user.displayName": "Nombre del usuario", 43 | "mysql.connectionOptions.user.description": "Indica el identificador de usuario que se va a usar al conectar con el origen de datos", 44 | "mysql.connectionOptions.password.displayName": "Contraseña", 45 | "mysql.connectionOptions.password.description": "Indica la contraseña que se utilizará al conectarse al origen de datos", 46 | "mysql.connectionOptions.port.displayName": "Puerto", 47 | "mysql.connectionOptions.port.description": "Número de puerto del servidor", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Tiempo de espera de la conexión", 49 | "mysql.connectionOptions.connectTimeout.description": "Segundos de espera antes de que se agote el tiempo de espera al conectarse", 50 | "mysql.connectionOptions.clientFlag.displayName": "Marcas de funcionalidad", 51 | "mysql.connectionOptions.clientFlag.description": "Marcas personalizadas para enviar al servidor MySQL", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "SQL_MODE predeterminado que se usará", 54 | "mysql.connectionOptions.ssl.displayName": "Modo SSL", 55 | "mysql.connectionOptions.ssl.description": "Modo SSL que se va a usar al conectarse", 56 | "mysql.connectionOptions.ssl.mode.disable": "Deshabilitar", 57 | "mysql.connectionOptions.ssl.mode.require": "Requerir", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "Clave SSL", 61 | "mysql.connectionOptions.ssl.key.description": "Nombre de la ruta de acceso de la clave privada del cliente que se va a usar para el certificado SSL", 62 | "mysql.connectionOptions.ssl.cert.displayName": "Certificado SSL de cliente", 63 | "mysql.connectionOptions.ssl.cert.description": "Ruta de acceso del archivo de certificado SSL de cliente", 64 | "mysql.connectionOptions.ssl.ca.displayName": "Certificado de entidad de certificación de SSL", 65 | "mysql.connectionOptions.ssl.ca.description": "Ruta de acceso del archivo de certificado de entidad de certificación de SSL", 66 | "mysql.resourceDeployment.displayName": "Azure Database for MySQL", 67 | "mysql.resourceDeployment.description": "Cree un servidor flexible Azure Database for MySQL: una base de datos como servicio MySQL totalmente administrada en Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Crear en Azure Portal", 69 | "mysql.resourceDeployment.agreements.template": "Acepto {0} y {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "El servidor flexible Azure Database for MySQL es un servicio de base de datos relacional con tecnología de MySQL Community Edition. Es una oferta de base de datos como servicio totalmente administrada que puede controlar cargas de trabajo críticas con un rendimiento predecible y escalabilidad dinámica. Además, esta base de datos está diseñada para obtener un control más pormenorizado y mayor flexibilidad para las funciones de administración de las bases de datos y las opciones de configuración. {0}", 71 | "microsoft.azure.termsOfUse": "Términos de uso de Microsoft Azure", 72 | "microsoft.privacy.statement": "Declaración de privacidad de Microsoft", 73 | "learnMore": "Más información.", 74 | "mysql.createDatabase": "Nueva base de datos" 75 | } -------------------------------------------------------------------------------- /i18n/fra/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Associer des schémas aux fichiers JSON dans le projet actuel", 8 | "json.schemas.url.desc": "URL de schéma ou chemin relatif d'un schéma dans le répertoire actuel", 9 | "json.schemas.fileMatch.desc": "Tableau de modèles de fichier à mapper durant la résolution de fichiers JSON en schémas.", 10 | "json.schemas.fileMatch.item.desc": "Modèle de fichier pouvant contenir '*' à mapper durant la résolution de fichiers JSON en schémas.", 11 | "json.schemas.schema.desc": "Définition de schéma pour l'URL indiquée. Le schéma doit être fourni uniquement pour éviter les accès à l'URL du schéma.", 12 | "json.format.enable.desc": "Activer/désactiver le formateur JSON par défaut (nécessite un redémarrage)", 13 | "mysql.description": "Extension MySQL for Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Facultatif] Journaliser la sortie de débogage dans la console VS Code (Aide -> Activer/désactiver les outils de développement)", 15 | "mysql.configuration.title": "Configuration MySQL", 16 | "mysql.enabled.description": "[Facultatif] Activer la prise en charge de MySQL (en cours de développement)", 17 | "mysql.debugSourcePath.description": "[Facultatif] Chemin d’accès au répertoire source de MySQL Tools Service pour le débogage", 18 | "mysql.useDebugSource.description": "[Facultatif] Activer l’exécution de l’extension MySQL via le chemin d’accès défini dans MySQL.debugSourcePath", 19 | "mysql.enableStartupDebugging.description": "[Facultatif] Indique si le MySQL Tools Service attend qu’un débogueur soit attaché au démarrage", 20 | "mysql.debugServerPort.description": "[Facultatif] Port sur lequel exécuter le débogueur distant MySQL Tools Service (3000 par défaut)", 21 | "mysql.defaultDatabase.description": "Base de données par défaut à utiliser lors de la création d’une connexion MySQL", 22 | "mysql.format.keywordCase.description": "[Facultatif] Modifie le format des mots clés. Les valeurs autorisées sont « upper », « lower » et « capitalize ».", 23 | "mysql.format.identifierCase.description": "[Facultatif] Modifie le format des identificateurs. Les valeurs autorisées sont « upper », « lower » et « capitalize ».", 24 | "mysql.format.stripComments.description": "[Facultatif] Si les commentaires Vrai sont supprimés des instructions", 25 | "mysql.format.reindent.description": "[Facultatif] Si la valeur est Vrai, les retraits des instructions sont modifiés.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Source", 28 | "mysql.connectionOptions.groupName.security": "Sécurité", 29 | "mysql.connectionOptions.groupName.server": "Serveur", 30 | "mysql.connectionOptions.groupName.client": "Client", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Nom (facultatif)", 33 | "mysql.connectionOptions.connectionName.description": "Nom personnalisé de la connexion", 34 | "mysql.connectionOptions.host.displayName": "Nom du serveur", 35 | "mysql.connectionOptions.host.description": "Nom du serveur MySQL", 36 | "mysql.connectionOptions.authenticationType.displayName": "Type d’authentification", 37 | "mysql.connectionOptions.authenticationType.description": "Comment s’authentifier sur le serveur", 38 | "mysql.connectionOptions.authenticationType.password": "Mot de passe", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Nom de la base de données", 41 | "mysql.connectionOptions.dbname.description": "Nom du catalogue initial ou de la base de données initiale dans la source de données", 42 | "mysql.connectionOptions.user.displayName": "Nom d’utilisateur", 43 | "mysql.connectionOptions.user.description": "Indique l'identifiant utilisateur à utiliser pour la connexion à la source de données", 44 | "mysql.connectionOptions.password.displayName": "Mot de passe", 45 | "mysql.connectionOptions.password.description": "Indique le mot de passe à utiliser pour la connexion à la source de données", 46 | "mysql.connectionOptions.port.displayName": "Port", 47 | "mysql.connectionOptions.port.description": "Numéro de port du serveur", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Délai d’expiration de la connexion", 49 | "mysql.connectionOptions.connectTimeout.description": "Secondes d’attente avant l’expiration du délai d’attente lors de la connexion", 50 | "mysql.connectionOptions.clientFlag.displayName": "Indicateurs de capacité", 51 | "mysql.connectionOptions.clientFlag.description": "Indicateurs personnalisés à envoyer au serveur MySQL", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "SQL_MODE par défaut à utiliser", 54 | "mysql.connectionOptions.ssl.displayName": "Mode SSL", 55 | "mysql.connectionOptions.ssl.description": "Mode SSL à utiliser lors de la connexion", 56 | "mysql.connectionOptions.ssl.mode.disable": "Désactiver", 57 | "mysql.connectionOptions.ssl.mode.require": "Demander", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify_CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify_identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "Clé SSL", 61 | "mysql.connectionOptions.ssl.key.description": "Nom du chemin d’accès de la clé privée du client à utiliser pour le certificat SSL", 62 | "mysql.connectionOptions.ssl.cert.displayName": "Certificat client SSL", 63 | "mysql.connectionOptions.ssl.cert.description": "Chemin d’accès du fichier de certificat client SSL", 64 | "mysql.connectionOptions.ssl.ca.displayName": "Certificat d’autorité de certification", 65 | "mysql.connectionOptions.ssl.ca.description": "Chemin d’accès du fichier de certificat d’autorité de certification SSL", 66 | "mysql.resourceDeployment.displayName": "Azure Database pour MySQL", 67 | "mysql.resourceDeployment.description": "Créez un serveur flexible Azure Database pour MySQL, une base de données MySQL complètement managée en tant que service sur Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Créer dans le portail Azure", 69 | "mysql.resourceDeployment.agreements.template": "J’accepte les {0} et {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "Azure Database pour MySQL Flexible Server est un service de base de données relationnelle avec l’édition de la communauté MySQL. Il s’agit d’une base de données complètement managée en tant que service qui peut gérer les charges de travail stratégiques avec des performances prévisibles et une scalabilité dynamique. De plus, il est conçu pour un contrôle et une flexibilité plus précis sur les fonctions de gestion de base de données et les paramètres de configuration. {0}", 71 | "microsoft.azure.termsOfUse": "Conditions d’utilisation de Microsoft Azure", 72 | "microsoft.privacy.statement": "Déclaration de confidentialité Microsoft", 73 | "learnMore": "En savoir plus.", 74 | "mysql.createDatabase": "Nouvelle base de données" 75 | } -------------------------------------------------------------------------------- /i18n/ita/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Associa schemi a file JSON nel progetto corrente", 8 | "json.schemas.url.desc": "URL di uno schema o percorso relativo di uno schema nella directory corrente", 9 | "json.schemas.fileMatch.desc": "Matrice di criteri dei file da usare per la ricerca durante la risoluzione di file JSON in schemi.", 10 | "json.schemas.fileMatch.item.desc": "Criteri dei file che possono contenere '*' da usare per la ricerca durante la risoluzione di file JSON in schemi.", 11 | "json.schemas.schema.desc": "Definizione dello schema per l'URL specificato. È necessario specificare lo schema per evitare accessi all'URL dello schema.", 12 | "json.format.enable.desc": "Abilita/Disabilita il formattatore JSON predefinito (richiede il riavvio)", 13 | "mysql.description": "Estensione MySQL per Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Facoltativo] Registra l'output di debug nella console di VS Code (Guida -> Attiva/Disattiva Strumenti di sviluppo)", 15 | "mysql.configuration.title": "Configurazione di MySQL", 16 | "mysql.enabled.description": "[Facoltativo] Abilitare il supporto di MySQL (attualmente in fase di sviluppo)", 17 | "mysql.debugSourcePath.description": "[Facoltativo] Percorso della directory di origine del servizio strumenti MySQL per il debug", 18 | "mysql.useDebugSource.description": "[Facoltativo] Abilitare l'esecuzione dell'estensione MySQL tramite il percorso impostato in MySQL.debugSourcePath", 19 | "mysql.enableStartupDebugging.description": "[Facoltativo] Indica se fare in modo che il servizio strumenti MySQL attenda il collegamento di un debugger all'avvio", 20 | "mysql.debugServerPort.description": "[Facoltativo] Porta su cui eseguire il debugger remoto del servizio strumenti MySQL (valore predefinito 3000)", 21 | "mysql.defaultDatabase.description": "Database predefinito da usare per la creazione di una nuova connessione MySQL", 22 | "mysql.format.keywordCase.description": "[Facoltativo] Modifica la modalità di formattazione delle parole chiave. I valori consentiti sono 'upper', 'lower' e 'capitalize'.", 23 | "mysql.format.identifierCase.description": "[Facoltativo] Modifica la modalità di formattazione degli identificatori. I valori consentiti sono 'upper', 'lower' e 'capitalize'.", 24 | "mysql.format.stripComments.description": "[Facoltativo] Se i commenti true vengono rimossi dalle istruzioni", 25 | "mysql.format.reindent.description": "[Facoltativo] Se true, i rientri delle istruzioni vengono modificati.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Origine", 28 | "mysql.connectionOptions.groupName.security": "Sicurezza", 29 | "mysql.connectionOptions.groupName.server": "Server", 30 | "mysql.connectionOptions.groupName.client": "Client", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Nome (facoltativo)", 33 | "mysql.connectionOptions.connectionName.description": "Nome personalizzato della connessione", 34 | "mysql.connectionOptions.host.displayName": "Nome del server", 35 | "mysql.connectionOptions.host.description": "Nome del server MySQL", 36 | "mysql.connectionOptions.authenticationType.displayName": "Tipo di autenticazione", 37 | "mysql.connectionOptions.authenticationType.description": "Come eseguire l'autenticazione con il server", 38 | "mysql.connectionOptions.authenticationType.password": "Password", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Nome database", 41 | "mysql.connectionOptions.dbname.description": "Nome del database o catalogo iniziale nell'origine dati", 42 | "mysql.connectionOptions.user.displayName": "Nome utente", 43 | "mysql.connectionOptions.user.description": "Indica l'ID utente da usare per la connessione all'origine dati", 44 | "mysql.connectionOptions.password.displayName": "Password", 45 | "mysql.connectionOptions.password.description": "Indica la password da usare per la connessione all'origine dati", 46 | "mysql.connectionOptions.port.displayName": "Porta", 47 | "mysql.connectionOptions.port.description": "Numero di porta per il server", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Timeout di connessione", 49 | "mysql.connectionOptions.connectTimeout.description": "Secondi di attesa prima del timeout durante la connessione", 50 | "mysql.connectionOptions.clientFlag.displayName": "Flag di funzionalità", 51 | "mysql.connectionOptions.clientFlag.description": "Flag personalizzati da inviare al server MySQL", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "Impostazione predefinita SQL_MODE da usare", 54 | "mysql.connectionOptions.ssl.displayName": "Modalità SSL", 55 | "mysql.connectionOptions.ssl.description": "Modalità SSL da usare per la connessione", 56 | "mysql.connectionOptions.ssl.mode.disable": "Disabilita", 57 | "mysql.connectionOptions.ssl.mode.require": "Richiedi", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "Chiave SSL", 61 | "mysql.connectionOptions.ssl.key.description": "Nome del percorso della chiave privata client da usare per il certificato SSL", 62 | "mysql.connectionOptions.ssl.cert.displayName": "Certificato client SSL", 63 | "mysql.connectionOptions.ssl.cert.description": "Percorso del file di certificato client SSL", 64 | "mysql.connectionOptions.ssl.ca.displayName": "Certificato CA SSL", 65 | "mysql.connectionOptions.ssl.ca.description": "Percorso del file di certificato CA SSL", 66 | "mysql.resourceDeployment.displayName": "Database di Azure per MySQL", 67 | "mysql.resourceDeployment.description": "Creare un server flessibile di Database di Azure per MySQL, un database MySQL completamente gestito come servizio in Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Crea nel portale di Azure", 69 | "mysql.resourceDeployment.agreements.template": "Accetto:{0} e {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "Il Server flessibile di Database di Azure per MySQL è un servizio di database relazionale basato su MySQL Community Edition. Si tratta di un'offerta di database distribuita come servizio completamente gestito, in grado di gestire carichi di lavoro cruciali con prestazioni prevedibili e scalabilità dinamica. Inoltre, è progettato per garantire un controllo più granulare e una maggiore flessibilità sulle funzioni di gestione del database e sulle impostazioni di configurazione. {0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure condizioni per l'utilizzo", 72 | "microsoft.privacy.statement": "Informativa sulla privacy di Microsoft", 73 | "learnMore": "Altre informazioni.", 74 | "mysql.createDatabase": "Nuovo database" 75 | } -------------------------------------------------------------------------------- /i18n/jpn/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "スキーマを現在のプロジェクトの JSON ファイルに関連付けます", 8 | "json.schemas.url.desc": "スキーマへの URL または現在のディレクトリ内のスキーマへの相対パス", 9 | "json.schemas.fileMatch.desc": "JSON ファイルをスキーマに解決するときに突き合わせるファイル パターンの配列です。", 10 | "json.schemas.fileMatch.item.desc": "JSON ファイルをスキーマに解決するときに突き合わせる、'*' を含められるファイル パターンです。", 11 | "json.schemas.schema.desc": "指定された URL のスキーマ定義です。スキーマは、スキーマ URL へのアクセスを避けるためにのみ指定する必要があります。", 12 | "json.format.enable.desc": "既定の JSON フォーマッタを有効/無効にします (再起動が必要です)", 13 | "mysql.description": "Azure Data Studio 用の MySQL の拡張機能", 14 | "mysql.logDebugInfo.description": "[省略可能] デバッグ出力を VS Code コンソールにログとして表示する (ヘルプ -> 開発者ツールの切り替え)", 15 | "mysql.configuration.title": "MySQL 構成", 16 | "mysql.enabled.description": "[省略可能] MySQL サポートを有効にする (現在開発中)", 17 | "mysql.debugSourcePath.description": "[省略可能] MySQL ツール サービスのソース ディレクトリへのパス (デバッグ用)", 18 | "mysql.useDebugSource.description": "[省略可能] MySQL.debugSourcePath で設定されたパスを使用して MySQL 拡張機能を実行できるようにする", 19 | "mysql.enableStartupDebugging.description": "[省略可能] 起動時にデバッガーがアタッチするのを MySQL ツール サービスに待機させるかどうか", 20 | "mysql.debugServerPort.description": "[省略可能] MySQL ツール サービス リモート デバッガーを実行するポート (既定 3000)", 21 | "mysql.defaultDatabase.description": "新しい MySQL 接続の作成時に使用する既定のデータベース", 22 | "mysql.format.keywordCase.description": "[省略可能] キーワードの書式を変更します。使用できる値は 'upper'、'lower'、'capitalize' です。", 23 | "mysql.format.identifierCase.description": "[省略可能] 識別子の書式を変更します。使用できる値は 'upper'、'lower'、'capitalize' です。", 24 | "mysql.format.stripComments.description": "[省略可能] true の場合、コメントがステートメントから削除されます", 25 | "mysql.format.reindent.description": "[省略可能] true の場合、ステートメントのインデントが変更されます。", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "ソース", 28 | "mysql.connectionOptions.groupName.security": "セキュリティ", 29 | "mysql.connectionOptions.groupName.server": "サーバー", 30 | "mysql.connectionOptions.groupName.client": "クライアント", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "名前 (省略可能)", 33 | "mysql.connectionOptions.connectionName.description": "接続のカスタム名", 34 | "mysql.connectionOptions.host.displayName": "サーバー名", 35 | "mysql.connectionOptions.host.description": "MySQL サーバーの名前", 36 | "mysql.connectionOptions.authenticationType.displayName": "認証の種類", 37 | "mysql.connectionOptions.authenticationType.description": "サーバーの認証方法", 38 | "mysql.connectionOptions.authenticationType.password": "パスワード", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "データベース名", 41 | "mysql.connectionOptions.dbname.description": "データ ソース内の初期カタログまたはデータベースの名前", 42 | "mysql.connectionOptions.user.displayName": "ユーザー名", 43 | "mysql.connectionOptions.user.description": "データ ソースへの接続時に使用するユーザー ID を示します", 44 | "mysql.connectionOptions.password.displayName": "パスワード", 45 | "mysql.connectionOptions.password.description": "データ ソースへの接続時に使用するパスワードを示します", 46 | "mysql.connectionOptions.port.displayName": "ポート", 47 | "mysql.connectionOptions.port.description": "サーバーのポート番号", 48 | "mysql.connectionOptions.connectTimeout.displayName": "接続タイムアウト", 49 | "mysql.connectionOptions.connectTimeout.description": "接続時にタイムアウトするまでの待機時間 (秒)", 50 | "mysql.connectionOptions.clientFlag.displayName": "機能フラグ", 51 | "mysql.connectionOptions.clientFlag.description": "MySQL サーバーに送信するカスタム フラグ", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "使用する既定の SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "SSL モード", 55 | "mysql.connectionOptions.ssl.description": "接続時に使用する SSL モード", 56 | "mysql.connectionOptions.ssl.mode.disable": "無効にする", 57 | "mysql.connectionOptions.ssl.mode.require": "必須", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "SSL キー", 61 | "mysql.connectionOptions.ssl.key.description": "SSL 証明書に使用するクライアント秘密キーのパス名", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL クライアント証明書", 63 | "mysql.connectionOptions.ssl.cert.description": "SSL クライアント証明書ファイルのパス", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL CA 証明書", 65 | "mysql.connectionOptions.ssl.ca.description": "SSL CA 証明書ファイルのパス", 66 | "mysql.resourceDeployment.displayName": "Azure Database for MySQL", 67 | "mysql.resourceDeployment.description": "Azure Database for MySQL フレキシブル サーバー (Azure 上のサービスとしてのフル マネージド MySQL データベース) を作成します。", 68 | "mysql.resourceDeployment.okButtonText": "Azure portal で作成", 69 | "mysql.resourceDeployment.agreements.template": "{0} と {1} に同意します。", 70 | "mysql.resourceDeployment.helpTexts.template": "Azure Database for MySQL フレキシブル サーバーは、MySQL コミュニティ エディションを利用したリレーショナル データベース サービスです。これは、予測可能なパフォーマンスと動的なスケーラビリティを使用してミッション クリティカルなワークロードを処理できるサービスとしてのフル マネージド データベース オファリングです。また、データベース管理機能と構成設定をより細かく制御し、柔軟性を高める設計になっています。{0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure 利用規約", 72 | "microsoft.privacy.statement": "Microsoft プライバシー ステートメント", 73 | "learnMore": "詳細情報。", 74 | "mysql.createDatabase": "新しいデータベース" 75 | } -------------------------------------------------------------------------------- /i18n/kor/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "현재 프로젝트에서 스키마를 JSON 파일에 연결", 8 | "json.schemas.url.desc": "현재 디렉터리에 있는 스키마의 URL 또는 상대 경로", 9 | "json.schemas.fileMatch.desc": "JSON 파일로 스키마를 확인할 때 일치할 파일 패턴의 배열입니다.", 10 | "json.schemas.fileMatch.item.desc": "JSON 파일로 스키마를 확인할 때 일치할 '*'를 포함할 수 있는 파일 패턴입니다.", 11 | "json.schemas.schema.desc": "지정된 URL의 스키마 정의입니다. 스키마는 스키마 URL에 대한 액세스 방지를 위해서만 제공해야 합니다.", 12 | "json.format.enable.desc": "기본 JSON 포맷터 사용/사용 안 함(다시 시작해야 함)", 13 | "mysql.description": "Azure Data Studio의 MySQL 확장", 14 | "mysql.logDebugInfo.description": "[옵션] VS Code 콘솔에 디버그 출력 로깅(도움말 -> 개발자 도구 토글)", 15 | "mysql.configuration.title": "MySQL 구성", 16 | "mysql.enabled.description": "[선택 사항] MySQL 지원을 사용합니다(현재 개발 중).", 17 | "mysql.debugSourcePath.description": "[선택 사항] MySQL 도구 서비스의 원본 디렉터리 경로, 디버깅용", 18 | "mysql.useDebugSource.description": "[선택 사항] MySQL.debugSourcePath에 설정된 경로를 통해 MySQL 확장 실행을 활성화합니다.", 19 | "mysql.enableStartupDebugging.description": "[선택 사항] 시작 시 MySQL 도구 서비스가 디버거가 연결될 때까지 대기하도록 할지 여부", 20 | "mysql.debugServerPort.description": "[선택 사항] MySQL 도구 서비스 원격 디버거를 실행할 포트입니다(기본값 3000).", 21 | "mysql.defaultDatabase.description": "새 MySQL 연결을 만들 때 사용할 기본 데이터베이스입니다.", 22 | "mysql.format.keywordCase.description": "[선택 사항] 키워드의 형식을 변경합니다. 허용되는 값은 'upper', 'lower' 및 'capitalize'입니다.", 23 | "mysql.format.identifierCase.description": "[선택 사항] 식별자의 형식을 변경합니다. 허용되는 값은 'upper', 'lower' 및 'capitalize'입니다.", 24 | "mysql.format.stripComments.description": "[선택 사항] true이면 문에서 주석이 제거됩니다.", 25 | "mysql.format.reindent.description": "[선택 사항] true이면 문의 들여쓰기가 변경됩니다.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "원본", 28 | "mysql.connectionOptions.groupName.security": "보안", 29 | "mysql.connectionOptions.groupName.server": "서버", 30 | "mysql.connectionOptions.groupName.client": "클라이언트", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "이름(선택 사항)", 33 | "mysql.connectionOptions.connectionName.description": "연결의 사용자 지정 이름", 34 | "mysql.connectionOptions.host.displayName": "서버 이름", 35 | "mysql.connectionOptions.host.description": "MySQL 서버의 이름", 36 | "mysql.connectionOptions.authenticationType.displayName": "인증 유형", 37 | "mysql.connectionOptions.authenticationType.description": "서버로 인증하는 방법", 38 | "mysql.connectionOptions.authenticationType.password": "암호", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "데이터베이스 이름", 41 | "mysql.connectionOptions.dbname.description": "데이터 원본의 초기 카탈로그 또는 데이터베이스 이름", 42 | "mysql.connectionOptions.user.displayName": "사용자 이름", 43 | "mysql.connectionOptions.user.description": "데이터 원본에 연결할 때 사용할 사용자 ID를 나타냅니다.", 44 | "mysql.connectionOptions.password.displayName": "암호", 45 | "mysql.connectionOptions.password.description": "데이터 원본에 연결할 때 사용할 암호를 나타냅니다.", 46 | "mysql.connectionOptions.port.displayName": "포트", 47 | "mysql.connectionOptions.port.description": "서버의 포트 번호", 48 | "mysql.connectionOptions.connectTimeout.displayName": "연결 시간 제한", 49 | "mysql.connectionOptions.connectTimeout.description": "연결할 때 시간이 초과되기 전에 대기할 시간(초)", 50 | "mysql.connectionOptions.clientFlag.displayName": "기능 플래그", 51 | "mysql.connectionOptions.clientFlag.description": "MySQL 서버로 보낼 사용자 지정 플래그", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "사용할 기본 SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "SSL 모드", 55 | "mysql.connectionOptions.ssl.description": "연결할 때 사용할 SSL 모드", 56 | "mysql.connectionOptions.ssl.mode.disable": "사용 안 함", 57 | "mysql.connectionOptions.ssl.mode.require": "필요", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "SSL 키", 61 | "mysql.connectionOptions.ssl.key.description": "SSL 인증서에 사용할 클라이언트 프라이빗 키의 경로 이름", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL 클라이언트 인증서", 63 | "mysql.connectionOptions.ssl.cert.description": "SSL 클라이언트 인증서 파일의 경로", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL CA 인증서", 65 | "mysql.connectionOptions.ssl.ca.description": "SSL CA 인증서 파일의 경로", 66 | "mysql.resourceDeployment.displayName": "Azure Database for MySQL", 67 | "mysql.resourceDeployment.description": "Azure의 완전 관리형 MySQL Database as a Service인 Azure Database for MySQL 유연한 서버를 만듭니다.", 68 | "mysql.resourceDeployment.okButtonText": "Azure Portal에서 만들기", 69 | "mysql.resourceDeployment.agreements.template": "{0} 및 {1}에 동의합니다.", 70 | "mysql.resourceDeployment.helpTexts.template": "Azure Database for MySQL 유연한 서버는 MySQL 커뮤니티 버전에서 제공하는 관계형 데이터베이스 서비스입니다. 예측 가능한 성능과 동적 확장성으로 중요 업무용 워크로드를 처리할 수 있는 완전 관리형 Database as a Service 제품입니다. 또한 데이터베이스 관리 기능 및 구성 설정에 대한 보다 세분화된 제어 및 유연성을 제공하도록 설계되었습니다. {0}", 71 | "microsoft.azure.termsOfUse": "Microsoft Azure 사용 약관", 72 | "microsoft.privacy.statement": "Microsoft 개인정보처리방침", 73 | "learnMore": "자세히 알아보세요.", 74 | "mysql.createDatabase": "새 데이터베이스" 75 | } -------------------------------------------------------------------------------- /i18n/ptb/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Esquemas associados a arquivos JSON no projeto atual", 8 | "json.schemas.url.desc": "Uma URL para um esquema ou um caminho relativo a um esquema no diretório atual", 9 | "json.schemas.fileMatch.desc": "Uma matriz de padrões de arquivos para fazer correspondência ao resolver arquivos JSON para esquemas.", 10 | "json.schemas.fileMatch.item.desc": "Um padrão de arquivos que pode conter '*' para fazer a correspondência ao resolver arquivos JSON para esquemas.", 11 | "json.schemas.schema.desc": "A definição de esquema para a URL fornecida. O esquema precisa ser fornecido apenas para evitar acessos à URL do esquema.", 12 | "json.format.enable.desc": "Habilitar/desabilitar o formatador JSON padrão (requer reinicialização)", 13 | "mysql.description": "Extensão MySQL para Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Opcional] Registre a saída de depuração no console do VS Code (Ajuda -> Alternar Ferramentas para Desenvolvedores)", 15 | "mysql.configuration.title": "Configuração do MySQL", 16 | "mysql.enabled.description": "[Opcional] Ativar suporte MySQL (atualmente em desenvolvimento)", 17 | "mysql.debugSourcePath.description": "[Opcional] Caminho para o diretório de origem do MySQL Tools Service, para depuração", 18 | "mysql.useDebugSource.description": "[Opcional] Ative a execução da extensão MySQL por meio do caminho definido em MySQL.debugSourcePath", 19 | "mysql.enableStartupDebugging.description": "[Opcional] Se o MySQL Tools Service deve aguardar a anexação de um depurador ao iniciar", 20 | "mysql.debugServerPort.description": "[Opcional] A porta para executar o depurador remoto MySQL Tools Service (padrão 3000)", 21 | "mysql.defaultDatabase.description": "O banco de dados padrão a ser usado ao criar uma nova conexão MySQL", 22 | "mysql.format.keywordCase.description": "[Opcional] Altera a forma como as palavras-chave são formatadas. Os valores permitidos são 'superior', 'inferior' e 'maiúsculo'.", 23 | "mysql.format.identifierCase.description": "[Opcional] Altera como os identificadores são formatados. Os valores permitidos são 'superior', 'inferior' e 'maiúsculo'.", 24 | "mysql.format.stripComments.description": "[Opcional] Se os comentários verdadeiros forem removidos das declarações", 25 | "mysql.format.reindent.description": "[Opcional] Se verdadeiro, os recuos das instruções são alterados.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Fonte", 28 | "mysql.connectionOptions.groupName.security": "Segurança", 29 | "mysql.connectionOptions.groupName.server": "Servidor", 30 | "mysql.connectionOptions.groupName.client": "Cliente", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Nome (opcional)", 33 | "mysql.connectionOptions.connectionName.description": "Nome personalizado da conexão", 34 | "mysql.connectionOptions.host.displayName": "Nome do servidor", 35 | "mysql.connectionOptions.host.description": "Nome do servidor MySQL", 36 | "mysql.connectionOptions.authenticationType.displayName": "Tipo de autenticação", 37 | "mysql.connectionOptions.authenticationType.description": "Como autenticar com o servidor", 38 | "mysql.connectionOptions.authenticationType.password": "Senha", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Nome do Banco de Dados", 41 | "mysql.connectionOptions.dbname.description": "O nome do catálogo ou banco de dados inicial na fonte de dados", 42 | "mysql.connectionOptions.user.displayName": "Nome de usuário", 43 | "mysql.connectionOptions.user.description": "Indica a ID de usuário a ser usada ao conectar-se à fonte de dados", 44 | "mysql.connectionOptions.password.displayName": "Senha", 45 | "mysql.connectionOptions.password.description": "Indica a senha a ser usada ao conectar-se à fonte de dados", 46 | "mysql.connectionOptions.port.displayName": "Porta", 47 | "mysql.connectionOptions.port.description": "Número da porta para o servidor", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Tempo limite de conexão", 49 | "mysql.connectionOptions.connectTimeout.description": "Segundos para esperar antes de expirar ao conectar", 50 | "mysql.connectionOptions.clientFlag.displayName": "Sinalizadores de capacidade", 51 | "mysql.connectionOptions.clientFlag.description": "Sinalizadores personalizados para enviar ao servidor MySQL", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "SQL_MODE padrão a ser usado", 54 | "mysql.connectionOptions.ssl.displayName": "Modo SSL", 55 | "mysql.connectionOptions.ssl.description": "O modo SSL a ser usado ao conectar", 56 | "mysql.connectionOptions.ssl.mode.disable": "Desabilitar", 57 | "mysql.connectionOptions.ssl.mode.require": "Exigir", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verificar-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verificar-identidade", 60 | "mysql.connectionOptions.ssl.key.displayName": "Chave SSL", 61 | "mysql.connectionOptions.ssl.key.description": "O nome do caminho da chave privada do cliente a ser usada para o certificado SSL", 62 | "mysql.connectionOptions.ssl.cert.displayName": "Certificado de cliente SSL", 63 | "mysql.connectionOptions.ssl.cert.description": "O caminho do arquivo de certificado de cliente SSL", 64 | "mysql.connectionOptions.ssl.ca.displayName": "certificado CA SSL", 65 | "mysql.connectionOptions.ssl.ca.description": "O caminho do arquivo de certificado SSL CA", 66 | "mysql.resourceDeployment.displayName": "Banco de Dados do Azure para MySQL", 67 | "mysql.resourceDeployment.description": "Crie um banco de dados do Azure para servidor flexível MySQL - um Banco de Dados do Azure para MySQL totalmente gerenciado como um serviço no Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Criar no portal do Azure", 69 | "mysql.resourceDeployment.agreements.template": "Eu aceito o {0} e {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "O Banco de Dados do Azure para MySQL servidor flexível é um serviço de banco de dados relacional desenvolvido pela edição da comunidade MySQL. É um banco de dados totalmente gerenciado como uma oferta de serviço que pode lidar com cargas de trabalho de missão crítica com desempenho previsível e escalabilidade dinâmica. Além disso, ele foi projetado para oferecer controle e flexibilidade mais granulares sobre funções de gerenciamento de banco de dados e definições de configuração. {0}", 71 | "microsoft.azure.termsOfUse": "Termos de uso do Microsoft Azure", 72 | "microsoft.privacy.statement": "Política de Privacidade da Microsoft", 73 | "learnMore": "Saiba Mais.", 74 | "mysql.createDatabase": "Novo Banco de Dados" 75 | } -------------------------------------------------------------------------------- /i18n/rus/package.i18n.json: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | // Do not edit this file. It is machine generated. 6 | { 7 | "json.schemas.desc": "Связь схем с JSON-файлами в текущем проекте", 8 | "json.schemas.url.desc": "URL-адрес схемы или относительный путь к ней в текущем каталоге", 9 | "json.schemas.fileMatch.desc": "Массив шаблонов файлов, с которым выполняется сравнение, при разрешении JSON-файлов в схемах.", 10 | "json.schemas.fileMatch.item.desc": "Шаблон файла, который может содержать \"*\" и с которым выполняется сравнение, при разрешении JSON-файлов в схемах.", 11 | "json.schemas.schema.desc": "Определение схемы для указанного URL-адреса. Схему необходимо указать только для того, чтобы не обращаться по URL-адресу схемы.", 12 | "json.format.enable.desc": "Включение или отключение модуля форматирования JSON по умолчанию (требуется перезагрузка)", 13 | "mysql.description": "Расширение MySQL для Azure Data Studio", 14 | "mysql.logDebugInfo.description": "[Необязательно] Выводить выходные данные отладки в консоль VS Code (Справка -> Переключить средства разработчика)", 15 | "mysql.configuration.title": "Конфигурация MySQL", 16 | "mysql.enabled.description": "[Необязательно] Включение поддержки MySQL (в настоящее время находится на этапе разработки)", 17 | "mysql.debugSourcePath.description": "[Необязательно] Путь к исходному каталогу службы инструментов MySQL для отладки", 18 | "mysql.useDebugSource.description": "[Необязательно] Разрешение выполнения расширения MySQL по пути, заданному в MySQL.debugSourcePath", 19 | "mysql.enableStartupDebugging.description": "[Необязательно] Следует ли службе инструментов MySQL ожидать подключения отладчика при запуске", 20 | "mysql.debugServerPort.description": "[Необязательно] Порт для запуска удаленного отладчика службы инструментов MySQL (по умолчанию — 3000)", 21 | "mysql.defaultDatabase.description": "База данных по умолчанию, используемая при создании подключения MySQL", 22 | "mysql.format.keywordCase.description": "[Необязательно] Изменяет формат ключевых слов. Допустимые значения: \"upper\", \"lower\" и \"capitalize\".", 23 | "mysql.format.identifierCase.description": "[Необязательно] Изменяет формат идентификаторов. Допустимые значения: \"upper\", \"lower\" и \"capitalize\".", 24 | "mysql.format.stripComments.description": "[Необязательно] Если задано значение \"true\", комментарии будут удалены из инструкций", 25 | "mysql.format.reindent.description": "[Необязательно] Если задано значение \"true\", отступы инструкций будут изменены.", 26 | "mysql.provider.displayName": "MySQL", 27 | "mysql.connectionOptions.groupName.source": "Источник", 28 | "mysql.connectionOptions.groupName.security": "Безопасность", 29 | "mysql.connectionOptions.groupName.server": "Сервер", 30 | "mysql.connectionOptions.groupName.client": "Клиент", 31 | "mysql.connectionOptions.groupName.ssl": "SSL", 32 | "mysql.connectionOptions.connectionName.displayName": "Имя (необязательно)", 33 | "mysql.connectionOptions.connectionName.description": "Настраиваемое имя подключения", 34 | "mysql.connectionOptions.host.displayName": "Имя сервера", 35 | "mysql.connectionOptions.host.description": "Имя сервера MySQL", 36 | "mysql.connectionOptions.authenticationType.displayName": "Тип проверки подлинности", 37 | "mysql.connectionOptions.authenticationType.description": "Не удалось пройти проверку подлинности на сервере", 38 | "mysql.connectionOptions.authenticationType.password": "Пароль", 39 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 40 | "mysql.connectionOptions.dbname.displayName": "Имя базы данных", 41 | "mysql.connectionOptions.dbname.description": "Имя исходного каталога или базы данных в источнике данных", 42 | "mysql.connectionOptions.user.displayName": "Имя пользователя", 43 | "mysql.connectionOptions.user.description": "Указывает идентификатор пользователя, который необходимо использовать для подключения к источнику данных", 44 | "mysql.connectionOptions.password.displayName": "Пароль", 45 | "mysql.connectionOptions.password.description": "Указывает пароль, который необходимо использовать для подключения к источнику данных", 46 | "mysql.connectionOptions.port.displayName": "Порт", 47 | "mysql.connectionOptions.port.description": "Номер порта для сервера", 48 | "mysql.connectionOptions.connectTimeout.displayName": "Истекло время ожидания подключения", 49 | "mysql.connectionOptions.connectTimeout.description": "Число секунд до истечения времени ожидания при подключении", 50 | "mysql.connectionOptions.clientFlag.displayName": "Флаги возможностей", 51 | "mysql.connectionOptions.clientFlag.description": "Настраиваемые флаги для отправки на сервер MySQL", 52 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 53 | "mysql.connectionOptions.sqlMode.description": "Используемый по умолчанию SQL_MODE", 54 | "mysql.connectionOptions.ssl.displayName": "Режим SSL", 55 | "mysql.connectionOptions.ssl.description": "Режим SSL, используемый при подключении", 56 | "mysql.connectionOptions.ssl.mode.disable": "Отключить", 57 | "mysql.connectionOptions.ssl.mode.require": "Обязательно", 58 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 59 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 60 | "mysql.connectionOptions.ssl.key.displayName": "Ключ SSL", 61 | "mysql.connectionOptions.ssl.key.description": "Имя пути закрытого ключа клиента, используемого для SSL-сертификата", 62 | "mysql.connectionOptions.ssl.cert.displayName": "SSL-сертификат клиента", 63 | "mysql.connectionOptions.ssl.cert.description": "Путь к файлу SSL-сертификата клиента", 64 | "mysql.connectionOptions.ssl.ca.displayName": "SSL-сертификат ЦС", 65 | "mysql.connectionOptions.ssl.ca.description": "Путь к файлу SSL-сертификата ЦС", 66 | "mysql.resourceDeployment.displayName": "База данных Azure для MySQL", 67 | "mysql.resourceDeployment.description": "Создайте гибкий сервер Базы данных Azure для MySQL — полностью управляемую базу данных MySQL как услугу в Azure.", 68 | "mysql.resourceDeployment.okButtonText": "Создать на портале Azure", 69 | "mysql.resourceDeployment.agreements.template": "Я принимаю {0} и {1}.", 70 | "mysql.resourceDeployment.helpTexts.template": "Гибкий сервер Базы данных Azure для MySQL — это служба реляционной базы данных на основе MySQL Community Edition. Это предложение полностью управляемой базы данных как услуги, которая может обрабатывать критически важные рабочие нагрузки с прогнозируемой производительностью и динамической масштабируемостью. Кроме того, она предназначена для более детального контроля и обеспечения гибкости функций управления базы данных и параметров конфигурации. {0}", 71 | "microsoft.azure.termsOfUse": "Условия использования Microsoft Azure", 72 | "microsoft.privacy.statement": "Заявление о конфиденциальности Майкрософт", 73 | "learnMore": "Дополнительные сведения.", 74 | "mysql.createDatabase": "Создать базу данных" 75 | } -------------------------------------------------------------------------------- /images/connection-details-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/azuredatastudio-mysql/8fa252c689ac936da02009b6038b3c3df0f80f49/images/connection-details-dialog.png -------------------------------------------------------------------------------- /images/dark/mysql_inverse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 13 | 17 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /images/extension-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/azuredatastudio-mysql/8fa252c689ac936da02009b6038b3c3df0f80f49/images/extension-icon.png -------------------------------------------------------------------------------- /images/light/mysql.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/new-connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/azuredatastudio-mysql/8fa252c689ac936da02009b6038b3c3df0f80f49/images/new-connection.png -------------------------------------------------------------------------------- /images/new-database.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "azuredatastudio-mysql", 3 | "displayName": "MySQL", 4 | "version": "1.0.0", 5 | "publisher": "Microsoft", 6 | "description": "%mysql.description%", 7 | "aiKey": "29a207bb14f84905966a8f22524cb730-25407f35-11b6-4d4e-8114-ab9e843cb52f-7380", 8 | "preview": false, 9 | "icon": "images/extension-icon.png", 10 | "repository": { 11 | "url": "https://github.com/microsoft/azuredatastudio-mysql" 12 | }, 13 | "license": "MIT", 14 | "activationEvents": [ 15 | "*" 16 | ], 17 | "engines": { 18 | "vscode": "*", 19 | "azdata": ">=1.40.0" 20 | }, 21 | "main": "./out/main", 22 | "extensionDependencies": [ 23 | "vscode.sql" 24 | ], 25 | "scripts": { 26 | "localize": "gulp ext:localize", 27 | "compile": "gulp build", 28 | "package": "gulp package:online", 29 | "package-offline": "gulp package:offline" 30 | }, 31 | "contributes": { 32 | "grammars": [ 33 | { 34 | "injectTo": [ "source.sql" ], 35 | "scopeName": "source.mysql-injection.sql", 36 | "path": "./syntaxes/mysql-injection.json" 37 | } 38 | ], 39 | "commands": [ 40 | { 41 | "command": "mySql.createDatabase", 42 | "title": "%mysql.createDatabase%", 43 | "category": "%mysql.createDatabase%", 44 | "icon": "images/new-database.svg" 45 | } 46 | ], 47 | "menus": { 48 | "dashboard/toolbar": [ 49 | { 50 | "command": "mySql.createDatabase", 51 | "when": "connectionProvider == 'MySQL' && dashboardContext == 'server'" 52 | } 53 | ], 54 | "objectExplorer/item/context": [ 55 | { 56 | "command": "mySql.createDatabase", 57 | "when": "connectionProvider == MySQL && nodeType =~ /^(Database|Server)$/", 58 | "group": "mysqlNewDatabase" 59 | } 60 | ] 61 | }, 62 | "languages": [ 63 | { 64 | "id": "sql", 65 | "extensions": [ 66 | ".sql" 67 | ], 68 | "aliases": [ 69 | "SQL" 70 | ] 71 | } 72 | ], 73 | "snippets": [ 74 | { 75 | "language": "sql", 76 | "path": "./snippets/mysql.json" 77 | } 78 | ], 79 | "outputChannels": [ 80 | "MySQL" 81 | ], 82 | "configuration": 83 | { 84 | "type": "object", 85 | "title": "%mysql.configuration.title%", 86 | "properties": { 87 | "MySQL.logDebugInfo": { 88 | "type": "boolean", 89 | "default": false, 90 | "description": "%mysql.logDebugInfo.description%" 91 | }, 92 | "MySQL.enabled": { 93 | "type": "boolean", 94 | "default": true, 95 | "description": "%mysql.enabled.description%" 96 | }, 97 | "MySQL.debugSourcePath": { 98 | "type": [ 99 | "string", 100 | "null" 101 | ], 102 | "default": null, 103 | "description": "%mysql.debugSourcePath.description%" 104 | }, 105 | "MySQL.useDebugSource": { 106 | "type": "boolean", 107 | "default": false, 108 | "description": "%mysql.useDebugSource.description%" 109 | }, 110 | "MySQL.enableStartupDebugging": { 111 | "type": "boolean", 112 | "default": false, 113 | "description": "%mysql.enableStartupDebugging.description%" 114 | }, 115 | "MySQL.debugServerPort": { 116 | "type": "number", 117 | "default": 3000, 118 | "description": "%mysql.debugServerPort.description%" 119 | }, 120 | "MySQL.defaultDatabase": { 121 | "type": "string", 122 | "default": "", 123 | "description": "%mysql.defaultDatabase.description%" 124 | }, 125 | "MySQL.format.keywordCase": { 126 | "type": [ 127 | "string", 128 | "null" 129 | ], 130 | "description": "%mysql.format.keywordCase.description%", 131 | "default": null, 132 | "enum": [ 133 | null, 134 | "upper", 135 | "lower", 136 | "capitalize" 137 | ] 138 | }, 139 | "MySQL.format.identifierCase": { 140 | "type": [ 141 | "string", 142 | "null" 143 | ], 144 | "description": "%mysql.format.identifierCase.description%", 145 | "default": null, 146 | "enum": [ 147 | null, 148 | "upper", 149 | "lower", 150 | "capitalize" 151 | ] 152 | }, 153 | "MySQL.format.stripComments": { 154 | "type": "boolean", 155 | "default": false, 156 | "description": "%mysql.format.stripComments.description%" 157 | }, 158 | "MySQL.format.reindent": { 159 | "type": "boolean", 160 | "default": true, 161 | "description": "%mysql.format.reindent.description%" 162 | } 163 | } 164 | }, 165 | "connectionProvider": { 166 | "protocolVersion": "1.0", 167 | "providerName": "MySQL", 168 | "providerId": "MySQL", 169 | "displayName": "%mysql.provider.displayName%", 170 | "azureResource": "OssRdbms", 171 | "iconPath": [ 172 | { 173 | "id": "mysql", 174 | "path": { 175 | "light": "./images/light/mysql.svg", 176 | "dark": "./images/dark/mysql_inverse.svg" 177 | }, 178 | "default": true 179 | } 180 | ], 181 | "connectionOptions": [ 182 | { 183 | "specialValueType": "connectionName", 184 | "isIdentity": true, 185 | "name": "connectionName", 186 | "displayName": "%mysql.connectionOptions.connectionName.displayName%", 187 | "description": "%mysql.connectionOptions.connectionName.description%", 188 | "groupName": "%mysql.connectionOptions.groupName.source%", 189 | "valueType": "string", 190 | "defaultValue": null, 191 | "objectType": null, 192 | "categoryValues": null, 193 | "isRequired": false, 194 | "isArray": false 195 | }, 196 | { 197 | "name": "host", 198 | "displayName": "%mysql.connectionOptions.host.displayName%", 199 | "description": "%mysql.connectionOptions.host.description%", 200 | "valueType": "string", 201 | "specialValueType": "serverName", 202 | "isIdentity": true, 203 | "isRequired": true, 204 | "groupName": "%mysql.connectionOptions.groupName.source%", 205 | "defaultValue": null, 206 | "objectType": null, 207 | "categoryValues": null, 208 | "isArray": false 209 | }, 210 | { 211 | "specialValueType": "authType", 212 | "isIdentity": true, 213 | "name": "authenticationType", 214 | "displayName": "%mysql.connectionOptions.authenticationType.displayName%", 215 | "description": "%mysql.connectionOptions.authenticationType.description%", 216 | "groupName": "%mysql.connectionOptions.groupName.security%", 217 | "valueType": "category", 218 | "defaultValue": "SqlLogin", 219 | "objectType": null, 220 | "categoryValues": [ 221 | { 222 | "displayName": "%mysql.connectionOptions.authenticationType.password%", 223 | "name": "SqlLogin" 224 | }, 225 | { 226 | "displayName": "%mysql.connectionOptions.authenticationType.azuremfaanduser%", 227 | "name": "AzureMFAAndUser" 228 | } 229 | ], 230 | "isRequired": true, 231 | "isArray": false 232 | }, 233 | { 234 | "name": "dbname", 235 | "displayName": "%mysql.connectionOptions.dbname.displayName%", 236 | "description": "%mysql.connectionOptions.dbname.description%", 237 | "valueType": "string", 238 | "specialValueType": "databaseName", 239 | "isIdentity": true, 240 | "isRequired": false, 241 | "groupName": "%mysql.connectionOptions.groupName.source%", 242 | "defaultValue": null 243 | }, 244 | { 245 | "name": "user", 246 | "displayName": "%mysql.connectionOptions.user.displayName%", 247 | "description": "%mysql.connectionOptions.user.description%", 248 | "valueType": "string", 249 | "specialValueType": "userName", 250 | "isIdentity": true, 251 | "isRequired": true, 252 | "groupName": "%mysql.connectionOptions.groupName.security%" 253 | }, 254 | { 255 | "name": "password", 256 | "displayName": "%mysql.connectionOptions.password.displayName%", 257 | "description": "%mysql.connectionOptions.password.description%", 258 | "valueType": "password", 259 | "specialValueType": "password", 260 | "isIdentity": true, 261 | "isRequired": true, 262 | "groupName": "%mysql.connectionOptions.groupName.security%" 263 | }, 264 | { 265 | "name": "port", 266 | "displayName": "%mysql.connectionOptions.port.displayName%", 267 | "description": "%mysql.connectionOptions.port.description%", 268 | "valueType": "number", 269 | "isIdentity": true, 270 | "groupName": "%mysql.connectionOptions.groupName.server%", 271 | "defaultValue": 3306 272 | }, 273 | { 274 | "name": "connectTimeout", 275 | "displayName": "%mysql.connectionOptions.connectTimeout.displayName%", 276 | "description": "%mysql.connectionOptions.connectTimeout.description%", 277 | "valueType": "number", 278 | "groupName": "%mysql.connectionOptions.groupName.client%", 279 | "defaultValue": 10 280 | }, 281 | { 282 | "name": "clientFlag", 283 | "displayName": "%mysql.connectionOptions.clientFlag.displayName%", 284 | "description": "%mysql.connectionOptions.clientFlag.description%", 285 | "valueType": "string", 286 | "groupName": "%mysql.connectionOptions.groupName.server%", 287 | "defaultValue": null 288 | }, 289 | { 290 | "name": "sqlMode", 291 | "displayName": "%mysql.connectionOptions.sqlMode.displayName%", 292 | "description": "%mysql.connectionOptions.sqlMode.description%", 293 | "valueType": "string", 294 | "groupName": "%mysql.connectionOptions.groupName.server%", 295 | "defaultValue": null 296 | }, 297 | { 298 | "name": "ssl", 299 | "displayName": "%mysql.connectionOptions.ssl.displayName%", 300 | "description": "%mysql.connectionOptions.ssl.description%", 301 | "valueType": "category", 302 | "groupName": "%mysql.connectionOptions.groupName.ssl%", 303 | "categoryValues": [ 304 | { 305 | "displayName": "%mysql.connectionOptions.ssl.mode.disable%", 306 | "name": "disable" 307 | }, 308 | { 309 | "displayName": "%mysql.connectionOptions.ssl.mode.require%", 310 | "name": "require" 311 | }, 312 | { 313 | "displayName": "%mysql.connectionOptions.ssl.mode.verify_ca%", 314 | "name": "verify_ca" 315 | }, 316 | { 317 | "displayName": "%mysql.connectionOptions.ssl.mode.verify_identity%", 318 | "name": "verify_identity" 319 | } 320 | ], 321 | "defaultValue": "require" 322 | }, 323 | { 324 | "name": "ssl.key", 325 | "displayName": "%mysql.connectionOptions.ssl.key.displayName%", 326 | "description": "%mysql.connectionOptions.ssl.key.description%", 327 | "valueType": "string", 328 | "groupName": "%mysql.connectionOptions.groupName.ssl%", 329 | "defaultValue": null 330 | }, 331 | { 332 | "name": "ssl.cert", 333 | "displayName": "%mysql.connectionOptions.ssl.cert.displayName%", 334 | "description": "%mysql.connectionOptions.ssl.cert.description%", 335 | "valueType": "string", 336 | "groupName": "%mysql.connectionOptions.groupName.ssl%", 337 | "defaultValue": null 338 | }, 339 | { 340 | "name": "ssl.ca", 341 | "displayName": "%mysql.connectionOptions.ssl.ca.displayName%", 342 | "description": "%mysql.connectionOptions.ssl.ca.description%", 343 | "valueType": "string", 344 | "groupName": "%mysql.connectionOptions.groupName.ssl%", 345 | "defaultValue": null 346 | } 347 | ] 348 | }, 349 | "resourceDeploymentTypes": [ 350 | { 351 | "name": "mysql-azure-database", 352 | "displayName": "%mysql.resourceDeployment.displayName%", 353 | "description": "%mysql.resourceDeployment.description%", 354 | "platforms": "*", 355 | "icon": "./images/extension-icon.png", 356 | "tags": [ 357 | "Azure Database for MySQL", 358 | "Cloud" 359 | ], 360 | "okButtonText": [ 361 | { 362 | "value": "%mysql.resourceDeployment.okButtonText%" 363 | } 364 | ], 365 | "providers": [ 366 | { 367 | "name": "mysql-azure-database-server", 368 | "webPageUrl": "https://portal.azure.com/#create/Microsoft.MySQLFlexibleServer", 369 | "requiredTools" : [ 370 | ] 371 | } 372 | ], 373 | "agreements": [ 374 | { 375 | "template": "%mysql.resourceDeployment.agreements.template%", 376 | "links": [ 377 | { 378 | "text": "%microsoft.azure.termsOfUse%", 379 | "url": "https://azure.microsoft.com/support/legal/" 380 | }, 381 | { 382 | "text": "%microsoft.privacy.statement%", 383 | "url": "https://privacy.microsoft.com/privacystatement" 384 | } 385 | ], 386 | "when": "true" 387 | } 388 | ], 389 | "helpTexts": [ 390 | { 391 | "template": "%mysql.resourceDeployment.helpTexts.template%", 392 | "links": [ 393 | { 394 | "text": "%learnMore%", 395 | "url": "https://docs.microsoft.com/azure/mysql/flexible-server/overview" 396 | } 397 | ] 398 | } 399 | ] 400 | } 401 | ] 402 | }, 403 | "dependencies": { 404 | "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.2", 405 | "@microsoft/ads-service-downloader": "^1.2.1", 406 | "@microsoft/ads-extension-telemetry": "^3.0.1", 407 | "tmp": "0.2.1 ", 408 | "vscode-languageclient": "5.2.1", 409 | "vscode-nls": "^5.0.0" 410 | }, 411 | "devDependencies": { 412 | "@types/node": "^13.11.0", 413 | "@types/vscode": "^1.39.0", 414 | "@types/azdata": "^1.41.0", 415 | "del": "^6.1.1", 416 | "event-stream": "^4.0.1", 417 | "gulp": "github:gulpjs/gulp#4.0.2", 418 | "gulp-json-editor": "^2.5.6", 419 | "gulp-rename": "^2.0.0", 420 | "gulp-shell": "^0.8.0", 421 | "gulp-sourcemaps": "^3.0.0", 422 | "gulp-tslint": "^8.1.4", 423 | "gulp-typescript": "^5.0.1", 424 | "typescript": "^4.8.3", 425 | "tslint": "^6.1.3", 426 | "vscode-nls-dev": "^4.0.0" 427 | }, 428 | "resolutions": { 429 | "gulp-cli": "^2.3.0", 430 | "decompress": "^4.2.1", 431 | "set-value": "^2.0.1", 432 | "mixin-deep": "^1.3.2", 433 | "ansi-regex": "^3.0.1", 434 | "glob-parent": "^5.1.2", 435 | "y18n": "^3.2.2", 436 | "ini": "^1.3.6", 437 | "kind-of": "^6.0.3", 438 | "minimatch": "^3.0.2", 439 | "minimist": "^1.2.3", 440 | "copy-props": "^2.0.5", 441 | "path-parse": "^1.0.7", 442 | "hosted-git-info": "^2.8.9", 443 | "yargs-parser": "^5.0.1", 444 | "bl": "^1.2.3", 445 | "lodash.template": "^4.5.0", 446 | "xml2js": "^0.5.0" 447 | } 448 | } -------------------------------------------------------------------------------- /package.nls.json: -------------------------------------------------------------------------------- 1 | { 2 | "json.schemas.desc": "Associate schemas to JSON files in the current project", 3 | "json.schemas.url.desc": "A URL to a schema or a relative path to a schema in the current directory", 4 | "json.schemas.fileMatch.desc": "An array of file patterns to match against when resolving JSON files to schemas.", 5 | "json.schemas.fileMatch.item.desc": "A file pattern that can contain '*' to match against when resolving JSON files to schemas.", 6 | "json.schemas.schema.desc": "The schema definition for the given URL. The schema only needs to be provided to avoid accesses to the schema URL.", 7 | "json.format.enable.desc": "Enable/disable default JSON formatter (requires restart)", 8 | 9 | "mysql.description": "MySQL extension for Azure Data Studio", 10 | "mysql.logDebugInfo.description": "[Optional] Log debug output to the VS Code console (Help -> Toggle Developer Tools)", 11 | "mysql.configuration.title": "MySQL configuration", 12 | "mysql.enabled.description": "[Optional] Enable MySQL support (currently in development)", 13 | "mysql.debugSourcePath.description": "[Optional] Path to the source directory of the MySQL Tools Service, for debugging", 14 | "mysql.useDebugSource.description": "[Optional] Enable running the MySQL extension via the path set in MySQL.debugSourcePath", 15 | "mysql.enableStartupDebugging.description": "[Optional] Whether to make the MySQL Tools Service wait for a debugger to attach when starting", 16 | "mysql.debugServerPort.description": "[Optional] The port to run the MySQL Tools Service remote debugger on (default 3000)", 17 | "mysql.defaultDatabase.description": "The default database to use when creating a new MySQL connection", 18 | "mysql.format.keywordCase.description": "[Optional] Changes how keywords are formatted. Allowed values are 'upper', 'lower' and 'capitalize'.", 19 | "mysql.format.identifierCase.description": "[Optional] Changes how identifiers are formatted. Allowed values are 'upper', 'lower' and 'capitalize'.", 20 | "mysql.format.stripComments.description": "[Optional] If true comments are removed from the statements", 21 | "mysql.format.reindent.description": "[Optional] If true the indentations of the statements are changed.", 22 | "mysql.provider.displayName": "MySQL", 23 | "mysql.connectionOptions.groupName.source": "Source", 24 | "mysql.connectionOptions.groupName.security": "Security", 25 | "mysql.connectionOptions.groupName.server": "Server", 26 | "mysql.connectionOptions.groupName.client": "Client", 27 | "mysql.connectionOptions.groupName.ssl": "SSL", 28 | "mysql.connectionOptions.connectionName.displayName": "Name (optional)", 29 | "mysql.connectionOptions.connectionName.description": "Custom name of the connection", 30 | "mysql.connectionOptions.host.displayName": "Server name", 31 | "mysql.connectionOptions.host.description": "Name of the MySQL server", 32 | "mysql.connectionOptions.authenticationType.displayName": "Authentication type", 33 | "mysql.connectionOptions.authenticationType.description": "How to authenticate with server", 34 | "mysql.connectionOptions.authenticationType.password": "Password", 35 | "mysql.connectionOptions.authenticationType.azuremfaanduser": "Azure Active Directory", 36 | "mysql.connectionOptions.dbname.displayName": "Database name", 37 | "mysql.connectionOptions.dbname.description": "The name of the initial catalog or database in the data source", 38 | "mysql.connectionOptions.user.displayName": "User name", 39 | "mysql.connectionOptions.user.description": "Indicates the user ID to be used when connecting to the data source", 40 | "mysql.connectionOptions.password.displayName": "Password", 41 | "mysql.connectionOptions.password.description": "Indicates the password to be used when connecting to the data source", 42 | "mysql.connectionOptions.port.displayName": "Port", 43 | "mysql.connectionOptions.port.description": "Port number for the server", 44 | "mysql.connectionOptions.connectTimeout.displayName": "Connect timeout", 45 | "mysql.connectionOptions.connectTimeout.description": "Seconds to wait before timing out when connecting", 46 | "mysql.connectionOptions.clientFlag.displayName": "Capability flags", 47 | "mysql.connectionOptions.clientFlag.description": "Custom flags to send to the MySQL server", 48 | "mysql.connectionOptions.sqlMode.displayName": "SQL_MODE", 49 | "mysql.connectionOptions.sqlMode.description": "Default SQL_MODE to use", 50 | "mysql.connectionOptions.ssl.displayName": "SSL mode", 51 | "mysql.connectionOptions.ssl.description": "The SSL mode to use when connecting", 52 | "mysql.connectionOptions.ssl.mode.disable": "Disable", 53 | "mysql.connectionOptions.ssl.mode.require": "Require", 54 | "mysql.connectionOptions.ssl.mode.verify_ca": "Verify-CA", 55 | "mysql.connectionOptions.ssl.mode.verify_identity": "Verify-Identity", 56 | "mysql.connectionOptions.ssl.key.displayName": "SSL key", 57 | "mysql.connectionOptions.ssl.key.description": "The path name of the client private key to use for the SSL certificate", 58 | "mysql.connectionOptions.ssl.cert.displayName": "SSL client certificate", 59 | "mysql.connectionOptions.ssl.cert.description": "The path of the SSL client certificate file", 60 | "mysql.connectionOptions.ssl.ca.displayName": "SSL CA certificate", 61 | "mysql.connectionOptions.ssl.ca.description": "The path of the SSL CA certificate file", 62 | "mysql.resourceDeployment.displayName" : "Azure Database for MySQL", 63 | "mysql.resourceDeployment.description" : "Create an Azure Database for MySQL flexible server - a fully managed MySQL database as a service on Azure.", 64 | "mysql.resourceDeployment.okButtonText" : "Create in Azure portal", 65 | "mysql.resourceDeployment.agreements.template" : "I accept the {0} and {1}.", 66 | "mysql.resourceDeployment.helpTexts.template" : "Azure Database for MySQL Flexible Server is a relational database service powered by the MySQL community edition. It's a fully managed database as a service offering that can handle mission-critical workloads with predictable performance and dynamic scalability. Additionally, it is designed for more granular control and flexibility over database management functions and configuration settings. {0}", 67 | "microsoft.azure.termsOfUse" : "Microsoft Azure terms of use", 68 | "microsoft.privacy.statement" : "Microsoft Privacy Statement", 69 | "learnMore" : "Learn More.", 70 | "mysql.createDatabase" : "New Database" 71 | } -------------------------------------------------------------------------------- /snippets/mysql.json: -------------------------------------------------------------------------------- 1 | { 2 | "Create a new Database": { 3 | "prefix": "mysqlCreateDatabase", 4 | "body": [ 5 | "-- Create a new database called '${1:DatabaseName}'", 6 | "CREATE DATABASE ${1:DatabaseName}" 7 | ], 8 | "description": "Create a new MySQL Database" 9 | }, 10 | "List databases": { 11 | "prefix": "mysqlListDatabases", 12 | "body": [ 13 | "-- Get a list of databases", 14 | "SHOW DATABASES" 15 | ], 16 | "description": "List MySQL databases" 17 | }, 18 | "Drop a database": { 19 | "prefix": "mysqlDropDatabase", 20 | "body": [ 21 | "-- Drop a database called '${1:DatabaseName}'", 22 | "DROP DATABASE ${1:DatabaseName}" 23 | ], 24 | "description": "Drop a MySQL database" 25 | } 26 | } -------------------------------------------------------------------------------- /src/LocProject.json: -------------------------------------------------------------------------------- 1 | { 2 | "Projects": [ 3 | { 4 | "LanguageSet": "AzureKatal_Languages", 5 | "LocItems": [ 6 | { 7 | "SourceFile": "src\\l10n\\l10n.xlf", 8 | "CopyOption": "LangIDOnName", 9 | "OutputPath": "src\\l10n\\transXlf" 10 | } 11 | ] 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /src/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "downloadUrl": "https://github.com/microsoft/mysqltoolsservice/releases/download/{#version#}/mysqltoolsservice-{#fileName#}", 3 | "version": "v0.1.2", 4 | "downloadFileNames": { 5 | "Windows_64": "win-x64.zip", 6 | "OSX": "osx.tar.gz", 7 | "OSX_ARM64": "osx-arm64.tar.gz", 8 | "Linux": "linux-x64.tar.gz", 9 | "Ubuntu_22": "ubuntu22-x64.tar.gz" 10 | }, 11 | "installDirectory": "bin/{#platform#}/{#version#}", 12 | "executableFiles": [ 13 | "mysqltoolsservice/ossdbtoolsservice_main", 14 | "mysqltoolsservice/ossdbtoolsservice_main.exe" 15 | ] 16 | } -------------------------------------------------------------------------------- /src/constants.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | 7 | export const serviceName = 'MySQL Tools Service'; 8 | export const providerId = 'MySQL'; 9 | export const serviceCrashLink = 'https://github.com/microsoft/pgtoolsservice/issues?q=is%3Aopen+is%3Aissue+label%3Aknown-issues'; 10 | -------------------------------------------------------------------------------- /src/contextProvider.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | import * as vscode from 'vscode'; 7 | import * as azdata from 'azdata'; 8 | 9 | export enum BuiltInCommands { 10 | SetContext = 'setContext', 11 | } 12 | 13 | export enum ContextKeys { 14 | ISCLOUD = 'mysql:iscloud' 15 | } 16 | 17 | const isCloudEditions = [ 18 | 5, 19 | 6 20 | ]; 21 | 22 | export function setCommandContext(key: ContextKeys | string, value: any) { 23 | return vscode.commands.executeCommand(BuiltInCommands.SetContext, key, value); 24 | } 25 | 26 | export default class ContextProvider { 27 | private _disposables = new Array(); 28 | 29 | constructor() { 30 | this._disposables.push(azdata.workspace.onDidOpenDashboard(this.onDashboardOpen, this)); 31 | this._disposables.push(azdata.workspace.onDidChangeToDashboard(this.onDashboardOpen, this)); 32 | } 33 | 34 | public onDashboardOpen(e: azdata.DashboardDocument): void { 35 | let iscloud: boolean; 36 | if (e.profile.providerName.toLowerCase() === 'mysql' && e.serverInfo.engineEditionId) { 37 | if (isCloudEditions.some(i => i === e.serverInfo.engineEditionId)) { 38 | iscloud = true; 39 | } else { 40 | iscloud = false; 41 | } 42 | } 43 | 44 | if (iscloud === true || iscloud === false) { 45 | setCommandContext(ContextKeys.ISCLOUD, iscloud); 46 | } 47 | } 48 | 49 | dispose(): void { 50 | this._disposables = this._disposables.map(i => i.dispose()); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/contracts/contracts.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { RequestType } from 'vscode-languageclient'; 7 | import { CreateDatabaseRequestParams, GetCharsetsRequestParams, GetCharsetsResponse, GetCollationsRequestParams, GetCollationsResponse } from "../models/newDatabaseModels"; 8 | 9 | export namespace CreateDatabaseRequest { 10 | export const type = new RequestType("mysqlnewdatabase/create"); 11 | } 12 | 13 | export namespace GetCharsetsRequest { 14 | export const type = new RequestType("mysqlnewdatabase/charsets"); 15 | } 16 | 17 | export namespace GetCollationsRequest { 18 | export const type = new RequestType("mysqlnewdatabase/collations"); 19 | } -------------------------------------------------------------------------------- /src/dialogs/newDatabaseDialog.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import * as azdata from 'azdata'; 6 | import { SqlOpsDataClient } from 'dataprotocol-client'; 7 | import * as vscode from 'vscode'; 8 | import { CharsetInfo } from '../models/newDatabaseModels'; 9 | import { CancelButtonLabel, CreateButtonLabel, DatabaseCharsetDropDownLabel, DatabaseCharsetLabel, DatabaseCollationDropDownLabel, DatabaseCollationLabel, DatabaseNameLabel, DatabaseNameTextBoxLabel, DatabaseNameTextBoxPlaceHolder, NewDatabaseDetailsTitle, NewDatabaseDialogName, NewDatabaseTitle } from '../uiConstants'; 10 | import { Deferred } from '../utils/PromiseUtils'; 11 | import { ToolsServiceUtils } from '../utils/toolsserviceUtils'; 12 | 13 | export class NewDatabaseDialog { 14 | public dialog: azdata.window.Dialog; 15 | public newDatabaseTab: azdata.window.DialogTab; 16 | public databaseNameTextBox: azdata.InputBoxComponent | undefined; 17 | public databaseCharsetDropDown: azdata.DropDownComponent | undefined; 18 | public databaseCollationDropDown: azdata.DropDownComponent | undefined; 19 | private connectionOwnerUri: string; 20 | private client: SqlOpsDataClient; 21 | private formBuilder: azdata.FormBuilder | undefined; 22 | private toDispose: vscode.Disposable[] = []; 23 | private initDialogComplete: Deferred = new Deferred(); 24 | private DEFAULT_CHARSET_VALUE = "utf8mb4"; 25 | private DEFAULT_COLLATION_VALUE = "utf8mb4_general_ci" 26 | private charsetsCache: string[] = []; 27 | private defaultCollationCache: Map = new Map(); 28 | private collationsCache: Map = new Map(); 29 | 30 | constructor(client: SqlOpsDataClient) { 31 | this.client = client; 32 | this.dialog = azdata.window.createModelViewDialog(NewDatabaseTitle, NewDatabaseDialogName); 33 | this.newDatabaseTab = azdata.window.createTab(''); 34 | this.dialog.registerCloseValidator(async () => { 35 | return this.executeAndValidate(); 36 | }); 37 | } 38 | 39 | public async openDialog(): Promise { 40 | this.initializeDialog(); 41 | this.dialog.okButton.label = CreateButtonLabel; 42 | this.dialog.okButton.enabled = false; 43 | this.toDispose.push(this.dialog.okButton.onClick(async () => await this.handleCreateButtonClick())); 44 | 45 | this.dialog.cancelButton.label = CancelButtonLabel; 46 | await this.loadConnectionOwnerUri(); 47 | azdata.window.openDialog(this.dialog); 48 | await this.initDialogComplete.promise; 49 | await this.loadDialogData(); 50 | this.onLoadingComplete(); 51 | } 52 | 53 | private async loadDialogData(): Promise { 54 | await this.loadAndUpdateCharsetValues(); 55 | await this.tryUpdateCollationDropDown(this.DEFAULT_CHARSET_VALUE); 56 | } 57 | 58 | private onLoadingComplete(): void { 59 | this.databaseNameTextBox.enabled = true; 60 | this.databaseCharsetDropDown.enabled = true; 61 | this.databaseCollationDropDown.enabled = true; 62 | } 63 | 64 | private async loadConnectionOwnerUri(): Promise { 65 | var connid = (await azdata.connection.getCurrentConnection()).connectionId; 66 | this.connectionOwnerUri = (await azdata.connection.getUriForConnection(connid)); 67 | } 68 | 69 | private async loadAndUpdateCharsetValues(): Promise { 70 | try { 71 | this.databaseCharsetDropDown.loading = true; 72 | var charsets: CharsetInfo[] = await ToolsServiceUtils.getCharsets(this.connectionOwnerUri, this.client); 73 | charsets.forEach(charset => { 74 | this.charsetsCache.push(charset.name); 75 | this.defaultCollationCache.set(charset.name, charset.defaultCollation); 76 | }); 77 | this.databaseCharsetDropDown.values = this.charsetsCache; 78 | } 79 | catch (e) { 80 | // Log the error message and keep the values of charset as default. 81 | console.warn("New Database Tab : Unable to fetch charset values. Using default charset.") 82 | } 83 | finally { 84 | this.databaseCharsetDropDown.loading = false; 85 | } 86 | } 87 | 88 | private initializeDialog(): void { 89 | this.initializeNewDatabaseTab(); 90 | this.dialog.content = [this.newDatabaseTab]; 91 | } 92 | 93 | private initializeNewDatabaseTab(): void { 94 | this.newDatabaseTab.registerContent(async view => { 95 | 96 | const databaseNameRow = this.createDatabaseNameRow(view); 97 | const databaseCharsetRow = this.createDatabaseCharsetRow(view); 98 | const databaseCollationRow = this.createDatabaseCollationRow(view); 99 | const newDatabaseDetailsFormSection = view.modelBuilder.flexContainer().withLayout({ flexFlow: 'column' }).component(); 100 | newDatabaseDetailsFormSection.addItems([databaseNameRow, databaseCharsetRow, databaseCollationRow]); 101 | 102 | this.formBuilder = view.modelBuilder.formContainer() 103 | .withFormItems([ 104 | { 105 | title: NewDatabaseDetailsTitle, 106 | components: [ 107 | { 108 | component: newDatabaseDetailsFormSection, 109 | } 110 | ] 111 | } 112 | ], { 113 | horizontal: false, 114 | titleFontSize: 13 115 | }) 116 | .withLayout({ 117 | width: '100%', 118 | padding: '10px 10px 0 20px' 119 | }); 120 | 121 | let formModel = this.formBuilder.component(); 122 | await view.initializeModel(formModel); 123 | this.initDialogComplete?.resolve(); 124 | }); 125 | } 126 | 127 | private createDatabaseNameRow(view: azdata.ModelView): azdata.FlexContainer { 128 | this.databaseNameTextBox = view.modelBuilder.inputBox().withProps({ 129 | ariaLabel: DatabaseNameTextBoxLabel, 130 | placeHolder: DatabaseNameTextBoxPlaceHolder, 131 | required: true, 132 | width: "310px", 133 | enabled: false 134 | }).component(); 135 | 136 | this.databaseNameTextBox.onTextChanged(() => { 137 | this.databaseNameTextBox!.value = this.databaseNameTextBox!.value?.trim(); 138 | void this.databaseNameTextBox!.updateProperty('title', this.databaseNameTextBox!.value); 139 | this.tryEnableCreateButton(); 140 | }); 141 | 142 | const databaseNameLabel = view.modelBuilder.text().withProps({ 143 | value: DatabaseNameLabel, 144 | requiredIndicator: true, 145 | width: '110px' 146 | }).component(); 147 | 148 | const databaseNameRow = view.modelBuilder.flexContainer().withItems([databaseNameLabel, this.databaseNameTextBox], { flex: '0 0 auto', CSSStyles: { 'margin-right': '10px', 'margin-top': '-10px' } }).withLayout({ flexFlow: 'row', alignItems: 'center' }).component(); 149 | 150 | return databaseNameRow; 151 | } 152 | 153 | private createDatabaseCharsetRow(view: azdata.ModelView): azdata.FlexContainer { 154 | this.databaseCharsetDropDown = view.modelBuilder.dropDown().withProps({ 155 | values: [this.DEFAULT_CHARSET_VALUE], 156 | value: this.DEFAULT_CHARSET_VALUE, 157 | ariaLabel: DatabaseCharsetDropDownLabel, 158 | required: false, 159 | width: '310px', 160 | enabled: false 161 | }).component(); 162 | 163 | this.databaseCharsetDropDown.onValueChanged(() => { 164 | this.tryUpdateCollationDropDown(this.getCurrentCharset()); 165 | }); 166 | 167 | const databaseCharsetLabel = view.modelBuilder.text().withProps({ 168 | value: DatabaseCharsetLabel, 169 | requiredIndicator: false, 170 | width: '110px' 171 | }).component(); 172 | 173 | const databaseCharsetRow = view.modelBuilder.flexContainer().withItems([databaseCharsetLabel, this.databaseCharsetDropDown], { flex: '0 0 auto', CSSStyles: { 'margin-right': '10px', 'margin-top': '-10px' } }).withLayout({ flexFlow: 'row', alignItems: 'center' }).component(); 174 | 175 | return databaseCharsetRow; 176 | } 177 | 178 | private async getCollationValues(charset: string): Promise { 179 | let collationValues = [this.defaultCollationCache.get(charset)]; 180 | try { 181 | if (!this.collationsCache.has(charset)) { 182 | let collations = await ToolsServiceUtils.getCollations(this.connectionOwnerUri, charset, this.client); 183 | this.collationsCache.set(charset, collations); 184 | } 185 | collationValues = this.collationsCache.get(charset); 186 | } 187 | catch (e) { 188 | // Log the error message and keep the values of collation value as default. 189 | console.warn("New Database Tab : Unable to fetch collation values. Using default collation.") 190 | } 191 | return collationValues; 192 | } 193 | 194 | private createDatabaseCollationRow(view: azdata.ModelView): azdata.FlexContainer { 195 | this.databaseCollationDropDown = view.modelBuilder.dropDown().withProps({ 196 | values: [this.DEFAULT_COLLATION_VALUE], 197 | value: this.DEFAULT_COLLATION_VALUE, 198 | ariaLabel: DatabaseCollationDropDownLabel, 199 | required: false, 200 | width: '310px', 201 | enabled: false 202 | }).component(); 203 | 204 | const databaseCollationLabel = view.modelBuilder.text().withProps({ 205 | value: DatabaseCollationLabel, 206 | requiredIndicator: false, 207 | width: '110px' 208 | }).component(); 209 | 210 | const databaseCharsetRow = view.modelBuilder.flexContainer().withItems([databaseCollationLabel, this.databaseCollationDropDown], { flex: '0 0 auto', CSSStyles: { 'margin-right': '10px', 'margin-top': '-10px' } }).withLayout({ flexFlow: 'row', alignItems: 'center' }).component(); 211 | 212 | return databaseCharsetRow; 213 | } 214 | 215 | private async tryUpdateCollationDropDown(charset_name: string): Promise { 216 | this.databaseCollationDropDown.loading = true; 217 | this.databaseCollationDropDown.value = this.defaultCollationCache.get(charset_name); 218 | this.databaseCollationDropDown.values = (await this.getCollationValues(charset_name)); 219 | this.databaseCollationDropDown.loading = false; 220 | } 221 | 222 | private tryEnableCreateButton(): void { 223 | this.dialog.okButton.enabled = true; 224 | } 225 | 226 | public async handleCreateButtonClick(): Promise { 227 | this.dispose(); 228 | } 229 | 230 | private dispose(): void { 231 | this.toDispose.forEach(disposable => disposable.dispose()); 232 | } 233 | 234 | private async executeAndValidate(): Promise { 235 | try { 236 | await ToolsServiceUtils.createDatabase( 237 | this.databaseNameTextBox.value, 238 | this.getCurrentCharset(), 239 | this.getCurrentCollation(), 240 | this.connectionOwnerUri, 241 | this.client); 242 | return true; 243 | } 244 | catch (e) { 245 | this.showErrorMessage(e.message) 246 | } 247 | return false; 248 | } 249 | 250 | private getCurrentCharset(): string { 251 | let charset = this.databaseCharsetDropDown.value; 252 | let charsetValue = (typeof charset === 'string') ? charset : charset.name; 253 | return charsetValue; 254 | } 255 | 256 | private getCurrentCollation(): string { 257 | let collation = this.databaseCollationDropDown.value; 258 | let collationValue = (typeof collation === 'string') ? collation : collation.name; 259 | return collationValue; 260 | } 261 | 262 | protected showErrorMessage(message: string): void { 263 | this.dialog.message = { 264 | text: message, 265 | level: azdata.window.MessageLevel.Error 266 | }; 267 | } 268 | } 269 | -------------------------------------------------------------------------------- /src/features/contracts.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as azdata from 'azdata'; 7 | import { NotificationType, RequestType } from "vscode-languageclient"; 8 | import * as telemetry from '@microsoft/ads-extension-telemetry'; 9 | 10 | 11 | // ------------------------------- < Telemetry Feature Events > ------------------------------------ 12 | 13 | /** 14 | * Event sent when the language service send a telemetry event 15 | */ 16 | 17 | export namespace TelemetryNotification { 18 | export const type = new NotificationType('telemetry/mysqlevent'); 19 | } 20 | 21 | /** 22 | * Update event parameters 23 | */ 24 | 25 | export class TelemetryParams { 26 | public params!: { 27 | eventName: string; 28 | properties: telemetry.TelemetryEventProperties; 29 | measures: telemetry.TelemetryEventMeasures; 30 | } 31 | } 32 | // ------------------------------- ------------------------------------ 33 | 34 | // ------------------------------- < Firewall Rule Feature Events > ------------------------------------ 35 | 36 | /** 37 | * A request to open up a firewall rule 38 | */ 39 | export namespace CreateFirewallRuleRequest { 40 | export const type = new RequestType('resource/createFirewallRule'); 41 | } 42 | 43 | /** 44 | * Firewall rule request handler 45 | */ 46 | export namespace HandleFirewallRuleRequest { 47 | export const type = new RequestType('resource/handleFirewallRule'); 48 | } 49 | 50 | /** 51 | * Firewall rule creation parameters 52 | */ 53 | export interface CreateFirewallRuleParams { 54 | /** 55 | * Account information to use in connecting to Azure 56 | */ 57 | account: azdata.Account; 58 | /** 59 | * Fully qualified name of the server to create a new firewall rule on 60 | */ 61 | serverName: string; 62 | /** 63 | * Start of the IP address range 64 | */ 65 | startIpAddress: string; 66 | /** 67 | * End of the IP address range 68 | */ 69 | endIpAddress: string; 70 | /** 71 | * Firewall rule name 72 | */ 73 | firewallRuleName: string; 74 | /** 75 | * Per-tenant token mappings. Ideally would be set independently of this call, 76 | * but for now this allows us to get the tokens necessary to find a server and open a firewall rule 77 | */ 78 | securityTokenMappings: {}; 79 | } 80 | 81 | /** 82 | * Firewall rule handling parameters 83 | */ 84 | export interface HandleFirewallRuleParams { 85 | /** 86 | * The error code used to defined the error type 87 | */ 88 | errorCode: number; 89 | /** 90 | * The error message from which to parse the IP address 91 | */ 92 | errorMessage: string; 93 | /** 94 | * The connection type, for example MSSQL 95 | */ 96 | connectionTypeId: string; 97 | } 98 | 99 | // ------------------------------- ------------------------------------ 100 | -------------------------------------------------------------------------------- /src/features/dbDesigner.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as vscode from 'vscode'; 7 | import { SqlOpsDataClient } from 'dataprotocol-client'; 8 | import { NewDatabaseDialog } from '../dialogs/newDatabaseDialog'; 9 | 10 | export function registerDbDesignerCommands(client: SqlOpsDataClient) { 11 | 12 | vscode.commands.registerCommand('mySql.createDatabase', async () => { 13 | return createNewDatabaseDialog(client); 14 | }) 15 | } 16 | 17 | async function createNewDatabaseDialog(client: SqlOpsDataClient) { 18 | let newDatabaseDialog = new NewDatabaseDialog(client); 19 | await newDatabaseDialog.openDialog(); 20 | return newDatabaseDialog; 21 | } -------------------------------------------------------------------------------- /src/features/firewall.ts: -------------------------------------------------------------------------------- 1 | import * as azdata from 'azdata'; 2 | import { SqlOpsDataClient, SqlOpsFeature } from "dataprotocol-client"; 3 | import { ClientCapabilities, Disposable, RPCMessageType, ServerCapabilities } from "vscode-languageclient"; 4 | import { CreateFirewallRuleParams, CreateFirewallRuleRequest, HandleFirewallRuleParams, HandleFirewallRuleRequest } from "./contracts"; 5 | import * as UUID from 'vscode-languageclient/lib/utils/uuid'; 6 | import * as Utils from '../utils'; 7 | import { AzureMysqlResourceProviderName } from '../uiConstants'; 8 | 9 | 10 | 11 | export class FireWallFeature extends SqlOpsFeature { 12 | 13 | private static readonly messagesTypes: RPCMessageType[] = [ 14 | CreateFirewallRuleRequest.type, 15 | HandleFirewallRuleRequest.type 16 | ]; 17 | 18 | constructor(client: SqlOpsDataClient) { 19 | super(client, FireWallFeature.messagesTypes); 20 | } 21 | 22 | public fillClientCapabilities(capabilities: ClientCapabilities): void { 23 | Utils.ensure(capabilities, 'firewall')!.firewall = true; 24 | } 25 | 26 | public initialize(capabilities: ServerCapabilities): void { 27 | this.register(this.messages, { 28 | id: UUID.generateUuid(), 29 | registerOptions: undefined 30 | }); 31 | } 32 | 33 | protected registerProvider(options: any): Disposable { 34 | const client = this._client; 35 | 36 | let createFirewallRule = (account: azdata.Account, firewallruleInfo: azdata.FirewallRuleInfo): Thenable => { 37 | return client.sendRequest(CreateFirewallRuleRequest.type, asCreateFirewallRuleParams(account, firewallruleInfo)); 38 | }; 39 | 40 | let handleFirewallRule = (errorCode: number, errorMessage: string, connectionTypeId: string): Thenable => { 41 | let params: HandleFirewallRuleParams = { errorCode: errorCode, errorMessage: errorMessage, connectionTypeId: connectionTypeId }; 42 | return client.sendRequest(HandleFirewallRuleRequest.type, params); 43 | }; 44 | 45 | return azdata.resources.registerResourceProvider({ 46 | displayName: AzureMysqlResourceProviderName, 47 | id: 'Microsoft.Azure.MySQL.ResourceProvider', 48 | settings: { 49 | 50 | } 51 | }, { 52 | handleFirewallRule, 53 | createFirewallRule 54 | }); 55 | } 56 | } 57 | 58 | function asCreateFirewallRuleParams(account: azdata.Account, params: azdata.FirewallRuleInfo): CreateFirewallRuleParams { 59 | return { 60 | account: account, 61 | serverName: params.serverName, 62 | startIpAddress: params.startIpAddress, 63 | endIpAddress: params.endIpAddress, 64 | securityTokenMappings: params.securityTokenMappings, 65 | firewallRuleName: params.firewallRuleName 66 | }; 67 | } -------------------------------------------------------------------------------- /src/features/telemetry.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import { SqlOpsDataClient } from "dataprotocol-client"; 7 | import { ClientCapabilities, StaticFeature } from "vscode-languageclient"; 8 | import * as Utils from '../utils'; 9 | import * as contracts from './contracts'; 10 | import { TelemetryReporter } from "../telemetry"; 11 | 12 | export class TelemetryFeature implements StaticFeature { 13 | 14 | constructor(private _client: SqlOpsDataClient) { } 15 | 16 | fillClientCapabilities(capabilities: ClientCapabilities): void { 17 | Utils.ensure(capabilities, 'telemetry')!.telemetry = true; 18 | } 19 | 20 | initialize(): void { 21 | this._client.onNotification(contracts.TelemetryNotification.type, e => { 22 | TelemetryReporter.sendTelemetryEvent(e.params.eventName, e.params.properties, e.params.measures); 23 | }); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/l10n/l10n.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Associate schemas to JSON files in the current project 6 | 7 | 8 | A URL to a schema or a relative path to a schema in the current directory 9 | 10 | 11 | An array of file patterns to match against when resolving JSON files to schemas. 12 | 13 | 14 | A file pattern that can contain '*' to match against when resolving JSON files to schemas. 15 | 16 | 17 | The schema definition for the given URL. The schema only needs to be provided to avoid accesses to the schema URL. 18 | 19 | 20 | Enable/disable default JSON formatter (requires restart) 21 | 22 | 23 | MySQL extension for Azure Data Studio 24 | 25 | 26 | [Optional] Log debug output to the VS Code console (Help -> Toggle Developer Tools) 27 | 28 | 29 | MySQL configuration 30 | 31 | 32 | [Optional] Enable MySQL support (currently in development) 33 | 34 | 35 | [Optional] Path to the source directory of the MySQL Tools Service, for debugging 36 | 37 | 38 | [Optional] Enable running the MySQL extension via the path set in MySQL.debugSourcePath 39 | 40 | 41 | [Optional] Whether to make the MySQL Tools Service wait for a debugger to attach when starting 42 | 43 | 44 | [Optional] The port to run the MySQL Tools Service remote debugger on (default 3000) 45 | 46 | 47 | The default database to use when creating a new MySQL connection 48 | 49 | 50 | [Optional] Changes how keywords are formatted. Allowed values are 'upper', 'lower' and 'capitalize'. 51 | 52 | 53 | [Optional] Changes how identifiers are formatted. Allowed values are 'upper', 'lower' and 'capitalize'. 54 | 55 | 56 | [Optional] If true comments are removed from the statements 57 | 58 | 59 | [Optional] If true the indentations of the statements are changed. 60 | 61 | 62 | MySQL 63 | 64 | 65 | Source 66 | 67 | 68 | Security 69 | 70 | 71 | Server 72 | 73 | 74 | Client 75 | 76 | 77 | SSL 78 | 79 | 80 | Name (optional) 81 | 82 | 83 | Custom name of the connection 84 | 85 | 86 | Server name 87 | 88 | 89 | Name of the MySQL server 90 | 91 | 92 | Authentication type 93 | 94 | 95 | How to authenticate with server 96 | 97 | 98 | Password 99 | 100 | 101 | Azure Active Directory 102 | 103 | 104 | Database name 105 | 106 | 107 | The name of the initial catalog or database in the data source 108 | 109 | 110 | User name 111 | 112 | 113 | Indicates the user ID to be used when connecting to the data source 114 | 115 | 116 | Password 117 | 118 | 119 | Indicates the password to be used when connecting to the data source 120 | 121 | 122 | Port 123 | 124 | 125 | Port number for the server 126 | 127 | 128 | Connect timeout 129 | 130 | 131 | Seconds to wait before timing out when connecting 132 | 133 | 134 | Capability flags 135 | 136 | 137 | Custom flags to send to the MySQL server 138 | 139 | 140 | SQL_MODE 141 | 142 | 143 | Default SQL_MODE to use 144 | 145 | 146 | SSL mode 147 | 148 | 149 | The SSL mode to use when connecting 150 | 151 | 152 | Disable 153 | 154 | 155 | Require 156 | 157 | 158 | Verify-CA 159 | 160 | 161 | Verify-Identity 162 | 163 | 164 | SSL key 165 | 166 | 167 | The path name of the client private key to use for the SSL certificate 168 | 169 | 170 | SSL client certificate 171 | 172 | 173 | The path of the SSL client certificate file 174 | 175 | 176 | SSL CA certificate 177 | 178 | 179 | The path of the SSL CA certificate file 180 | 181 | 182 | Azure Database for MySQL 183 | 184 | 185 | Create an Azure Database for MySQL flexible server - a fully managed MySQL database as a service on Azure. 186 | 187 | 188 | Create in Azure portal 189 | 190 | 191 | I accept the {0} and {1}. 192 | 193 | 194 | Azure Database for MySQL Flexible Server is a relational database service powered by the MySQL community edition. It's a fully managed database as a service offering that can handle mission-critical workloads with predictable performance and dynamic scalability. Additionally, it is designed for more granular control and flexibility over database management functions and configuration settings. {0} 195 | 196 | 197 | Microsoft Azure terms of use 198 | 199 | 200 | Microsoft Privacy Statement 201 | 202 | 203 | Learn More. 204 | 205 | 206 | New Database 207 | 208 | 209 | 210 | 211 | Unsupported platform 212 | 213 | 214 | {0} service started 215 | 216 | 217 | Starting {0} service 218 | 219 | 220 | Failed to start {0} tools service 221 | 222 | 223 | Installing {0} to {1} 224 | 225 | 226 | Installing {0} 227 | 228 | 229 | Installed {0} 230 | 231 | 232 | Downloading {0} 233 | 234 | 235 | ({0} KB) 236 | 237 | 238 | Downloading {0} 239 | 240 | 241 | Done! 242 | 243 | 244 | 245 | 246 | View Known Issues 247 | 248 | 249 | {0} component exited unexpectedly. Please restart Azure Data Studio. 250 | 251 | 252 | 253 | 254 | New Database 255 | 256 | 257 | newDatabaseDialog 258 | 259 | 260 | Create 261 | 262 | 263 | Cancel 264 | 265 | 266 | New Database Details 267 | 268 | 269 | Database Name TextBox 270 | 271 | 272 | Enter New Database Name 273 | 274 | 275 | Name 276 | 277 | 278 | Database Charset Dropdown 279 | 280 | 281 | Charset 282 | 283 | 284 | Database Collation Dropdown 285 | 286 | 287 | Collation 288 | 289 | 290 | Azure MySQL Resource Provider 291 | 292 | 293 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | 7 | import * as vscode from 'vscode'; 8 | import * as path from 'path'; 9 | import * as nls from 'vscode-nls'; 10 | const localize = nls.config({ messageFormat: nls.MessageFormat.file })(); 11 | import { SqlOpsDataClient, ClientOptions } from 'dataprotocol-client'; 12 | import { IConfig, ServerProvider, Events } from '@microsoft/ads-service-downloader'; 13 | import { ServerOptions, TransportKind } from 'vscode-languageclient'; 14 | 15 | import * as Constants from './constants'; 16 | import ContextProvider from './contextProvider'; 17 | import * as Utils from './utils'; 18 | import { TelemetryReporter, LanguageClientErrorHandler } from './telemetry'; 19 | import { TelemetryFeature } from './features/telemetry'; 20 | import { registerDbDesignerCommands } from './features/dbDesigner'; 21 | import { FireWallFeature } from './features/firewall' 22 | 23 | const baseConfig = require('./config.json'); 24 | const outputChannel = vscode.window.createOutputChannel(Constants.serviceName); 25 | const statusView = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left); 26 | 27 | export async function activate(context: vscode.ExtensionContext) { 28 | 29 | // lets make sure we support this platform first 30 | let supported = await Utils.verifyPlatform(); 31 | 32 | if (!supported) { 33 | vscode.window.showErrorMessage(localize('unsupportedPlatformMsg', "Unsupported platform")); 34 | return; 35 | } 36 | 37 | let config: IConfig = JSON.parse(JSON.stringify(baseConfig)); 38 | config.installDirectory = path.join(__dirname, config.installDirectory); 39 | config.proxy = vscode.workspace.getConfiguration('http').get('proxy'); 40 | config.strictSSL = vscode.workspace.getConfiguration('http').get('proxyStrictSSL') || true; 41 | 42 | let languageClient: SqlOpsDataClient; 43 | 44 | const serverdownloader = new ServerProvider(config); 45 | 46 | serverdownloader.eventEmitter.onAny(generateHandleServerProviderEvent()); 47 | 48 | let clientOptions: ClientOptions = { 49 | providerId: Constants.providerId, 50 | errorHandler: new LanguageClientErrorHandler(), 51 | documentSelector: ['sql'], 52 | synchronize: { 53 | configurationSection: Constants.providerId 54 | }, 55 | features: [ 56 | // we only want to add new features 57 | ...SqlOpsDataClient.defaultFeatures, 58 | TelemetryFeature, 59 | FireWallFeature 60 | ], 61 | }; 62 | 63 | const installationStart = Date.now(); 64 | serverdownloader.getOrDownloadServer().then(e => { 65 | const installationComplete = Date.now(); 66 | let serverOptions = generateServerOptions(e); 67 | languageClient = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions); 68 | const processStart = Date.now(); 69 | languageClient.onReady().then(() => { 70 | const processEnd = Date.now(); 71 | statusView.text = localize('serviceStartedStatusMsg', "{0} service started", Constants.providerId); 72 | setTimeout(() => { 73 | statusView.hide(); 74 | }, 1500); 75 | TelemetryReporter.sendTelemetryEvent('startup/LanguageClientStarted', { 76 | installationTime: String(installationComplete - installationStart), 77 | processStartupTime: String(processEnd - processStart), 78 | totalTime: String(processEnd - installationStart), 79 | beginningTimestamp: String(installationStart) 80 | }); 81 | }); 82 | statusView.show(); 83 | statusView.text = localize('startingServiceStatusMsg', "Starting {0} service", Constants.providerId); 84 | registerDbDesignerCommands(languageClient); 85 | languageClient.start(); 86 | }, e => { 87 | TelemetryReporter.sendTelemetryEvent('ServiceInitializingFailed'); 88 | vscode.window.showErrorMessage(localize('failedToStartServiceErrorMsg', "Failed to start {0} tools service", Constants.providerId)); 89 | }); 90 | 91 | let contextProvider = new ContextProvider(); 92 | context.subscriptions.push(contextProvider); 93 | context.subscriptions.push(TelemetryReporter); 94 | context.subscriptions.push({ dispose: () => languageClient.stop() }); 95 | } 96 | 97 | function generateServerOptions(executablePath: string): ServerOptions { 98 | let serverArgs = []; 99 | let serverCommand: string = executablePath; 100 | 101 | let config = vscode.workspace.getConfiguration(Constants.providerId); 102 | if (config) { 103 | // Override the server path with the local debug path if enabled 104 | 105 | let useLocalSource = config["useDebugSource"]; 106 | if (useLocalSource) { 107 | let localSourcePath = config["debugSourcePath"]; 108 | let filePath = path.join(localSourcePath, "ossdbtoolsservice/ossdbtoolsservice_main.py"); 109 | process.env.PYTHONPATH = localSourcePath; 110 | serverCommand = process.platform === 'win32' ? 'python' : 'python3'; 111 | 112 | let enableStartupDebugging = config["enableStartupDebugging"]; 113 | let debuggingArg = enableStartupDebugging ? '--enable-remote-debugging-wait' : '--enable-remote-debugging'; 114 | let debugPort = config["debugServerPort"]; 115 | debuggingArg += '=' + debugPort; 116 | serverArgs = [filePath, debuggingArg]; 117 | } 118 | 119 | let logFileLocation = path.join(Utils.getDefaultLogLocation(), Constants.providerId); 120 | 121 | serverArgs.push('--log-dir=' + logFileLocation); 122 | serverArgs.push(logFileLocation); 123 | 124 | // Enable diagnostic logging in the service if it is configured 125 | let logDebugInfo = config["logDebugInfo"]; 126 | if (logDebugInfo) { 127 | serverArgs.push('--enable-logging'); 128 | } 129 | } 130 | 131 | serverArgs.push('provider=' + Constants.providerId); 132 | // run the service host 133 | return { command: serverCommand, args: serverArgs, transport: TransportKind.stdio }; 134 | } 135 | 136 | function generateHandleServerProviderEvent() { 137 | let dots = 0; 138 | return (e: string, ...args: any[]) => { 139 | outputChannel.show(); 140 | statusView.show(); 141 | switch (e) { 142 | case Events.INSTALL_START: 143 | outputChannel.appendLine(localize('installingServiceChannelMsg', "Installing {0} to {1}", Constants.serviceName, args[0])); 144 | statusView.text = localize('installingServiceStatusMsg', "Installing {0}", Constants.serviceName); 145 | break; 146 | case Events.INSTALL_END: 147 | outputChannel.appendLine(localize('installedServiceChannelMsg', "Installed {0}", Constants.serviceName)); 148 | break; 149 | case Events.DOWNLOAD_START: 150 | outputChannel.appendLine(localize('downloadingServiceChannelMsg', "Downloading {0}", args[0])); 151 | outputChannel.append(localize('downloadingServiceSizeChannelMsg', "({0} KB)", Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language))); 152 | statusView.text = localize('downloadingServiceStatusMsg', "Downloading {0}", Constants.serviceName); 153 | break; 154 | case Events.DOWNLOAD_PROGRESS: 155 | let newDots = Math.ceil(args[0] / 5); 156 | if (newDots > dots) { 157 | outputChannel.append('.'.repeat(newDots - dots)); 158 | dots = newDots; 159 | } 160 | break; 161 | case Events.DOWNLOAD_END: 162 | outputChannel.appendLine(localize('downloadServiceDoneChannelMsg', "Done!")); 163 | break; 164 | } 165 | }; 166 | } 167 | 168 | // this method is called when your extension is deactivated 169 | export function deactivate(): void { 170 | } 171 | -------------------------------------------------------------------------------- /src/models/newDatabaseModels.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | export interface CreateDatabaseRequestParams { 7 | ownerUri: string, 8 | dbName: string, 9 | charset: string, 10 | collation: string 11 | } 12 | 13 | export interface GetCharsetsRequestParams { 14 | ownerUri: string 15 | } 16 | 17 | export interface CharsetInfo { 18 | name: string, 19 | defaultCollation: string 20 | } 21 | 22 | export interface GetCharsetsResponse { 23 | charsets: CharsetInfo[] 24 | } 25 | 26 | export interface GetCollationsRequestParams { 27 | ownerUri: string, 28 | charset: string 29 | } 30 | 31 | export interface GetCollationsResponse { 32 | collations: string[] 33 | } -------------------------------------------------------------------------------- /src/telemetry.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | 'use strict'; 7 | import * as vscode from 'vscode'; 8 | 9 | import * as nls from 'vscode-nls'; 10 | const localize = nls.loadMessageBundle() 11 | import AdsTelemetryReporter from '@microsoft/ads-extension-telemetry'; 12 | import { ErrorAction, ErrorHandler, Message, CloseAction } from 'vscode-languageclient'; 13 | import * as Utils from './utils'; 14 | import * as Constants from './constants'; 15 | const packageJson = require('../package.json'); 16 | 17 | const viewKnownIssuesAction = localize('viewKnownIssuesText', "View Known Issues") 18 | let packageInfo = Utils.getPackageInfo(packageJson); 19 | 20 | 21 | export const TelemetryReporter = new AdsTelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); 22 | 23 | /** 24 | * Handle Language Service client errors 25 | * @class LanguageClientErrorHandler 26 | */ 27 | export class LanguageClientErrorHandler implements ErrorHandler { 28 | 29 | /** 30 | * Show an error message prompt with a link to known issues wiki page 31 | * @memberOf LanguageClientErrorHandler 32 | */ 33 | showOnErrorPrompt(): void { 34 | TelemetryReporter.sendTelemetryEvent(Constants.serviceName + 'Crash'); 35 | void vscode.window.showErrorMessage( 36 | localize('serviceCrashMessage', "{0} component exited unexpectedly. Please restart Azure Data Studio.", Constants.serviceName), 37 | viewKnownIssuesAction).then(action => { 38 | if (action && action === viewKnownIssuesAction) { 39 | void vscode.env.openExternal(vscode.Uri.parse(Constants.serviceCrashLink)); 40 | } 41 | }); 42 | } 43 | 44 | /** 45 | * Callback for language service client error 46 | * 47 | * @param {Error} error 48 | * @param {Message} message 49 | * @param {number} count 50 | * @returns {ErrorAction} 51 | * 52 | * @memberOf LanguageClientErrorHandler 53 | */ 54 | error(error: Error, message: Message, count: number): ErrorAction { 55 | this.showOnErrorPrompt(); 56 | 57 | // we don't retry running the service since crashes leave the extension 58 | // in a bad, unrecovered state 59 | return ErrorAction.Shutdown; 60 | } 61 | 62 | /** 63 | * Callback for language service client closed 64 | * 65 | * @returns {CloseAction} 66 | * 67 | * @memberOf LanguageClientErrorHandler 68 | */ 69 | closed(): CloseAction { 70 | this.showOnErrorPrompt(); 71 | 72 | // we don't retry running the service since crashes leave the extension 73 | // in a bad, unrecovered state 74 | return CloseAction.DoNotRestart; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/uiConstants.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | import * as nls from 'vscode-nls'; 7 | const localize = nls.loadMessageBundle() 8 | 9 | export const NewDatabaseTitle = localize('newDatabaseTitle', 'New Database'); 10 | export const NewDatabaseDialogName = localize('newDatabaseDialogName', 'newDatabaseDialog') 11 | export const CreateButtonLabel = localize('createButtonLabel', 'Create') 12 | export const CancelButtonLabel = localize('cancelButtonLabel', 'Cancel') 13 | export const NewDatabaseDetailsTitle = localize('newDatabaseDetailsTitle', 'New Database Details') 14 | export const DatabaseNameTextBoxLabel = localize('databaseNameTextBoxLabel', 'Database Name TextBox') 15 | export const DatabaseNameTextBoxPlaceHolder = localize('newDatabaseNameTextBoxPlaceHolder', 'Enter New Database Name') 16 | export const DatabaseNameLabel = localize('databaseNameLabel', 'Name') 17 | export const DatabaseCharsetDropDownLabel = localize('databaseCharsetDropDownLabel', 'Database Charset Dropdown') 18 | export const DatabaseCharsetLabel = localize('databaseCharsetLabel', 'Charset') 19 | export const DatabaseCollationDropDownLabel = localize('databaseCollationDropDownLabel', 'Database Collation Dropdown') 20 | export const DatabaseCollationLabel = localize('databaseCollationLabel', 'Collation') 21 | export const AzureMysqlResourceProviderName = localize('azureMysqlResourceProviderName', 'Azure MySQL Resource Provider') -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | 7 | import * as path from 'path'; 8 | import * as crypto from 'crypto'; 9 | import * as os from 'os'; 10 | 11 | var baseConfig = require('./config.json'); 12 | 13 | // The function is a duplicate of \src\paths.js. IT would be better to import path.js but it doesn't 14 | // work for now because the extension is running in different process. 15 | export function getAppDataPath() { 16 | let platform = process.platform; 17 | switch (platform) { 18 | case 'win32': return process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming'); 19 | case 'darwin': return path.join(os.homedir(), 'Library', 'Application Support'); 20 | case 'linux': return process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config'); 21 | default: throw new Error('Platform not supported'); 22 | } 23 | } 24 | 25 | export function getDefaultLogLocation() { 26 | return path.join(getAppDataPath(), 'sqlops'); 27 | } 28 | 29 | export function ensure(target: object, key: string): any { 30 | if (target[key] === void 0) { 31 | target[key] = {} as any; 32 | } 33 | return target[key]; 34 | } 35 | 36 | export interface IPackageInfo { 37 | name: string; 38 | version: string; 39 | aiKey: string; 40 | } 41 | 42 | export function getPackageInfo(packageJson: any): IPackageInfo { 43 | if (packageJson) { 44 | return { 45 | name: packageJson.name, 46 | version: packageJson.version, 47 | aiKey: packageJson.aiKey 48 | }; 49 | } 50 | } 51 | 52 | export function generateUserId(): Promise { 53 | return new Promise(resolve => { 54 | try { 55 | let interfaces = os.networkInterfaces(); 56 | let mac; 57 | for (let key of Object.keys(interfaces)) { 58 | let item = interfaces[key][0]; 59 | if (!item.internal) { 60 | mac = item.mac; 61 | break; 62 | } 63 | } 64 | if (mac) { 65 | resolve(crypto.createHash('sha256').update(mac + os.homedir(), 'utf8').digest('hex')); 66 | } else { 67 | resolve(generateGuid()); 68 | } 69 | } catch (err) { 70 | resolve(generateGuid()); // fallback 71 | } 72 | }); 73 | } 74 | 75 | export function generateGuid(): string { 76 | let hexValues: string[] = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']; 77 | // c.f. rfc4122 (UUID version 4 = xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx) 78 | let oct: string = ''; 79 | let tmp: number; 80 | /* tslint:disable:no-bitwise */ 81 | for (let a: number = 0; a < 4; a++) { 82 | tmp = (4294967296 * Math.random()) | 0; 83 | oct += hexValues[tmp & 0xF] + 84 | hexValues[tmp >> 4 & 0xF] + 85 | hexValues[tmp >> 8 & 0xF] + 86 | hexValues[tmp >> 12 & 0xF] + 87 | hexValues[tmp >> 16 & 0xF] + 88 | hexValues[tmp >> 20 & 0xF] + 89 | hexValues[tmp >> 24 & 0xF] + 90 | hexValues[tmp >> 28 & 0xF]; 91 | } 92 | 93 | // 'Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively' 94 | let clockSequenceHi: string = hexValues[8 + (Math.random() * 4) | 0]; 95 | return oct.substr(0, 8) + '-' + oct.substr(9, 4) + '-4' + oct.substr(13, 3) + '-' + clockSequenceHi + oct.substr(16, 3) + '-' + oct.substr(19, 12); 96 | /* tslint:enable:no-bitwise */ 97 | } 98 | 99 | export function verifyPlatform(): Thenable { 100 | if (os.platform() === 'darwin' && parseFloat(os.release()) < 16.0) { 101 | return Promise.resolve(false); 102 | } else { 103 | return Promise.resolve(true); 104 | } 105 | } 106 | 107 | export function getServiceInstallConfig() { 108 | let config = JSON.parse(JSON.stringify(baseConfig)); 109 | config.installDirectory = path.join(__dirname, config.installDirectory); 110 | 111 | return config; 112 | } 113 | 114 | export function getResolvedServiceInstallationPath(runtime: Runtime): string{ 115 | let config = getServiceInstallConfig(); 116 | let dir = config.installDirectory; 117 | dir = dir.replace('{#version#}', config.version); 118 | dir = dir.replace('{#platform#}', getRuntimeDisplayName(runtime)); 119 | 120 | return dir; 121 | } 122 | 123 | export function getRuntimeDisplayName(runtime: Runtime): string { 124 | switch (runtime) { 125 | case Runtime.Windows_64: 126 | return 'Windows'; 127 | case Runtime.Windows_86: 128 | return 'Windows'; 129 | case Runtime.OSX: 130 | return 'OSX'; 131 | case Runtime.Linux_64: 132 | return 'Linux'; 133 | default: 134 | return 'Unknown'; 135 | } 136 | } 137 | 138 | export enum Runtime { 139 | Unknown = 'Unknown', 140 | Windows_86 = 'Windows_86', 141 | Windows_64 = 'Windows_64', 142 | OSX = 'OSX', 143 | CentOS_7 = 'CentOS_7', 144 | Debian_8 = 'Debian_8', 145 | Fedora_23 = 'Fedora_23', 146 | OpenSUSE_13_2 = 'OpenSUSE_13_2', 147 | SLES_12_2 = 'SLES_12_2', 148 | RHEL_7 = 'RHEL_7', 149 | Ubuntu_14 = 'Ubuntu_14', 150 | Ubuntu_16 = 'Ubuntu_16', 151 | Linux_64 = 'Linux_64', 152 | Linux_86 = 'Linux-86' 153 | } -------------------------------------------------------------------------------- /src/utils/PromiseUtils.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | export class Deferred { 7 | promise: Promise; 8 | resolve!: (value: T | PromiseLike) => void; 9 | reject!: (reason?: any) => void; 10 | constructor() { 11 | this.promise = new Promise((resolve, reject) => { 12 | this.resolve = resolve; 13 | this.reject = reject; 14 | }); 15 | } 16 | 17 | then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; 18 | then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; 19 | then(onfulfilled?: (value: T) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable { 20 | return this.promise.then(onfulfilled, onrejected); 21 | } 22 | } -------------------------------------------------------------------------------- /src/utils/toolsserviceUtils.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the Source EULA. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | import * as azdata from "azdata"; 7 | import { SqlOpsDataClient } from "dataprotocol-client"; 8 | import { SimpleExecuteRequest } from "dataprotocol-client/lib/protocol"; 9 | import { CreateDatabaseRequest, GetCharsetsRequest, GetCollationsRequest } from "../contracts/contracts"; 10 | import { CharsetInfo, CreateDatabaseRequestParams, GetCharsetsRequestParams, GetCharsetsResponse, GetCollationsRequestParams, GetCollationsResponse } from "../models/newDatabaseModels"; 11 | 12 | export class ToolsServiceUtils { 13 | 14 | public static async getCharsets(ownerUri: string, client: SqlOpsDataClient): Promise { 15 | let params: GetCharsetsRequestParams = {ownerUri: ownerUri}; 16 | let result: GetCharsetsResponse = (await client.sendRequest(GetCharsetsRequest.type, params)); 17 | return result.charsets; 18 | } 19 | 20 | public static async getCollations(ownerUri:string, charset: string, client: SqlOpsDataClient): Promise { 21 | let params: GetCollationsRequestParams = {ownerUri: ownerUri, charset: charset}; 22 | let result: GetCollationsResponse = (await client.sendRequest(GetCollationsRequest.type, params)); 23 | return result.collations; 24 | } 25 | 26 | public static async createDatabase(dbname: string, charset: string, collation: string, ownerUri: string, client: SqlOpsDataClient): Promise { 27 | let params: CreateDatabaseRequestParams = {ownerUri: ownerUri, dbName: dbname, charset: charset, collation: collation}; 28 | await client.sendRequest(CreateDatabaseRequest.type, params); 29 | } 30 | 31 | public static async runQuery(ownerUri: string, queryString: string, client: SqlOpsDataClient): Promise { 32 | let params: azdata.SimpleExecuteParams = { ownerUri: ownerUri, queryString: queryString } 33 | return await client.sendRequest(SimpleExecuteRequest.type, params); 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /syntaxes/mysql-injection.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", 3 | "patterns": [ 4 | { 5 | "include": "#mysql-keywords" 6 | }, 7 | { 8 | "include": "#mysql-functions" 9 | }, 10 | { 11 | "include": "#mysql-strings" 12 | } 13 | ], 14 | "repository": { 15 | "mysql-keywords": { 16 | "patterns": [{ 17 | "name": "keyword.mysql.sql", 18 | "match": "\\b(?i)(accessible|account|active|against|all|analyse|analyze|any|array|asensitive|attribute|auto_increment|autoextend_size|avg_row_length|backup|binlog|blob|bool|both|btree|buckets|byte|cache|cascade|cascaded|catalog_name|chain|change|changed|channel|charset|cipher|class_origin|client|clone|code|collation|column|column_format|column_name|columns|comment|compact|completion|component|compressed|concurrent|condition|connection|consistent|constraint_catalog|constraint_name|constraint_schema|contains|context|cpu|current|cursor_name|databases|datafile|day_hour|day_microsecond|day_minute|day_second|default_auth|definer|delay_key_write|delayed|des_key_file|describe|deterministic|diagnostics|directory|discard|distinctrow|do|double|dual|dumpfile|duplicate|each|elseif|enclosed|ends|enforced|engine|engine_attribute|engines|enum|error|errors|escape|escaped|events|every|exchange|exclude|exit|expansion|expire|explain|export|extended|extent_size|failed_login_attempts|false|faults|fields|file_block_size|fixed|float4|float8|flush|follows|for|foreign|found|full|general|get_master_public_key|grants|group|group_replication|groups|handler|help|high_priority|history|host|hosts|hour_microsecond|hour_minute|hour_second|identified|ignore|ignore_server_ids|import|inactive|indexes|infile|initial_size|inner|inout|insert_method|install|instance|int1|int2|int3|int4|int8|invisible|invoker|io_after_gtids|io_before_gtids|io_thread|ipc|issuer|iterate|key_block_size|keys|lateral|leading|leave|leaves|less|linear|lines|list|lock|locked|locks|logfile|logs|long|longblob|longtext|low_priority|managed|master_auto_position|master_bind|master_compression_algorithms|master_connect_retry|master_delay|master_heartbeat_period|master_host|master_log_file|master_log_pos|master_password|master_port|master_public_key_path|master_retry_count|master_server_id|master_ssl|master_ssl_ca|master_ssl_capath|master_ssl_cert|master_ssl_cipher|master_ssl_crl|master_ssl_crlpath|master_ssl_key|master_ssl_verify_server_cert|master_tls_ciphersuites|master_tls_version|master_user|master_zstd_compression_level|max_connections_per_hour|max_queries_per_hour|max_rows|max_size|max_updates_per_hour|max_user_connections|maxvalue|medium|mediumblob|mediumint|mediumtext|member|memory|message_text|middleint|migrate|min_rows|minute_microsecond|minute_second|mode|modifies|mutex|mysql_errno|names|national|natural|ndb|ndbcluster|nested|network_namespace|new|no_wait|no_write_to_binlog|nodegroup|nulls|of|offset|oj|old|one|only|optimize|optimizer_costs|optional|optionally|options|order|orderby|ordinality|organization|others|outfile|pack_keys|parser|partitioning|partitions|password_lock_time|persist|persist_only|phase|plugin|plugin_dir|plugins|port|precedes|prepare|preserve|prev|privilege_checks_user|privileges|process|processlist|profiles|proxy|purge|query|quick|random|reads|recover|redo_buffer_size|redofile|redundant|reference|relay|relay_log_file|relay_log_pos|relay_thread|relaylog|release|reload|rename|repair|replicate_do_db|replicate_do_table|replicate_ignore_db|replicate_ignore_table|replicate_rewrite_db|replicate_wild_do_table|replicate_wild_ignore_table|replication|require|require_row_format|resignal|respect|restrict|retain|returned_sqlstate|returning|reuse|rotate|routine|row_format|row_number|rtree|savepoint|schedule|schemas|second_microsecond|secondary_engine|secondary_engine_attribute|secondary_load|secondary_unload|sensitive|separator|share|show|signal|signed|slave|slow|socket|some|soname|sounds|source|specific|sql_after_gtids|sql_after_mts_gaps|sql_before_gtids|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sql_thread|sqlexception|sqlstate|sqlwarning|srid|stacked|starting|starts|stats_auto_recalc|stats_persistent|stats_sample_pages|storage|stored|stream|string|subclass_origin|subpartition|subpartitions|super|swaps|switches|table_checksum|table_name|tables|tablespace|temporary|temptable|terminated|than|thread_priority|ties|tinyblob|tinytext|tls|trailing|trigger|triggers|true|types|undefined|undo|undo_buffer_size|undofile|uninstall|unknown|unsigned|until|upgrade|usage|use_frm|user_resources|varcharacter|variables|varying|vcpu|view|virtual|visible|wait|warnings|work|wrapper|write|x509|xa|xid|year_month|zerofill)\\b" 19 | }] 20 | }, 21 | "mysql-functions": { 22 | "patterns": [{ 23 | "name": "support.function.mysql.sql", 24 | "match": "\\b(?i)(adddate|addtime|aes_decrypt|aes_encrypt|any_value|asymmetric_decrypt|asymmetric_derive|asymmetric_encrypt|asymmetric_sign|asymmetric_verify|benchmark|bin|bin_to_uuid|bit_and|bit_count|bit_length|bit_or|bit_xor|can_access_column|can_access_database|can_access_table|can_access_view|ceil|char_length|character_length|coercibility|concat_ws|connection_id|conv|convert_tz|crc32|create_asymmetric_priv_key|create_asymmetric_pub_key|create_dh_parameters|create_digest|cume_dist|curdate|current_date|current_role|curtime|date_add|date_sub|dayname|dayofmonth|dayofweek|dayofyear|div|elt|export_set|extract|extractvalue|field|find_in_set|first_value|format_bytes|format_pico_time|found_rows|from_base64|from_days|from_unixtime|geomcollection|geometrycollection|get_dd_column_privileges|get_dd_create_options|get_dd_index_sub_part_length|get_format|get_lock|greatest|group_concat|gtid_subset|gtid_subtract|hex|hour|icu_version|inet_aton|inet_ntoa|inet6_aton|inet6_ntoa|instr|internal_auto_increment|internal_avg_row_length|internal_check_time|internal_checksum|internal_data_free|internal_data_length|internal_dd_char_length|internal_get_comment_or_error|internal_get_enabled_role_json|internal_get_hostname|internal_get_username|internal_get_view_warning_or_error|internal_index_column_cardinality|internal_index_length|internal_is_enabled_role|internal_is_mandatory_role|internal_keys_disabled|internal_max_data_length|internal_table_rows|internal_update_time|interval|is_free_lock|is_ipv4|is_ipv4_compat|is_ipv4_mapped|is_ipv6|is_used_lock|is_uuid|json_array|json_array_append|json_array_insert|json_arrayagg|json_contains|json_contains_path|json_depth|json_extract|json_insert|json_keys|json_length|json_merge|json_merge_patch|json_merge_preserve|json_object|json_objectagg|json_overlaps|json_pretty|json_quote|json_remove|json_replace|json_schema_valid|json_schema_validation_report|json_search|json_set|json_storage_free|json_storage_size|json_table|json_type|json_unquote|json_valid|json_value|lag|last_day|last_insert_id|last_value|lcase|lead|least|linestring|ln|load_file|localtime|localtimestamp|log2|lpad|make_set|makedate|maketime|master_pos_wait|match|max|mbrcontains|mbrcoveredby|mbrcovers|mbrdisjoint|mbrequals|mbrintersects|mbroverlaps|mbrtouches|mbrwithin|md5|memberof|mid|min|minute|mod|monthname|multilinestring|multipoint|multipolygon|name_const|nth_value|oct|octet_length|ord|percent_rank|period_add|period_diff|position|pow|ps_current_thread_id|ps_thread_id|quarter|quote|random_bytes|regexp|regexp_instr|regexp_like|regexp_replace|regexp_substr|release_all_locks|release_lock|rlike|roles_graphml|row_count|rpad|sec_to_time|second|sha1|sha2|sleep|soundslike|st_area|st_asbinary|st_asgeojson|st_astext|st_buffer|st_buffer_strategy|st_centroid|st_contains|st_convexhull|st_crosses|st_difference|st_dimension|st_disjoint|st_distance|st_distance_sphere|st_endpoint|st_envelope|st_equals|st_exteriorring|st_geohash|st_geomcollfromtext|st_geomcollfromwkb|st_geometryn|st_geometrytype|st_geomfromgeojson|st_geomfromtext|st_geomfromwkb|st_interiorringn|st_intersection|st_intersects|st_isclosed|st_isempty|st_issimple|st_isvalid|st_latfromgeohash|st_latitude|st_length|st_linefromtext|st_linefromwkb|st_longfromgeohash|st_longitude|st_makeenvelope|st_mlinefromtext|st_mlinefromwkb|st_mpointfromtext|st_mpointfromwkb|st_mpolyfromtext|st_mpolyfromwkb|st_numgeometries|st_numinteriorring|st_numpoints|st_overlaps|st_pointfromgeohash|st_pointfromtext|st_pointfromwkb|st_pointn|st_polyfromtext|st_polyfromwkb|st_simplify|st_srid|st_startpoint|st_swapxy|st_symdifference|st_touches|st_transform|st_union|st_validate|st_within|st_x|st_y|statement_digest|statement_digest_text|std|stddev|stddev_pop|stddev_samp|str_to_date|strcmp|subdate|substr|substring_index|subtime|time_format|time_to_sec|timediff|timestampadd|timestampdiff|to_base64|to_days|to_seconds|ucase|uncompress|uncompressed_length|unhex|unix_timestamp|updatexml|upper|user|utc_date|utc_time|utc_timestamp|uuid|uuid_short|uuid_to_bin|validate_password_strength|var_pop|var_samp|variance|wait_for_executed_gtid_set|wait_until_sql_thread_after_gtids|week|weekofyear|weight_string|xor|yearweek)\\b" 25 | }] 26 | }, 27 | "mysql-strings": { 28 | "patterns": [ 29 | { 30 | "match": "(')([^'\\\\]|(\\\\'))*(')", 31 | "name": "string.quoted.single.mysql.sql" 32 | } 33 | ] 34 | } 35 | }, 36 | "scopeName": "source.mysql-injection.sql", 37 | "injectionSelector": "L:source.sql -comment" 38 | } 39 | -------------------------------------------------------------------------------- /tasks/config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | var projectRoot = path.resolve(path.dirname(__dirname)); 4 | var srcRoot = path.resolve(projectRoot, 'src'); 5 | var viewsRoot = path.resolve(srcRoot, 'views'); 6 | var htmlcontentRoot = path.resolve(viewsRoot, 'htmlcontent'); 7 | var outRoot = path.resolve(projectRoot, 'out'); 8 | var htmloutroot = path.resolve(outRoot, 'src/views/htmlcontent'); 9 | var localization = path.resolve(projectRoot, 'localization'); 10 | 11 | var config = { 12 | paths: { 13 | project: { 14 | root: projectRoot, 15 | localization: localization 16 | }, 17 | extension: { 18 | root: srcRoot 19 | }, 20 | html: { 21 | root: htmlcontentRoot, 22 | out: htmloutroot 23 | } 24 | } 25 | } 26 | 27 | module.exports = config; -------------------------------------------------------------------------------- /tasks/covertasks.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var del = require('del'); 3 | var jeditor = require("gulp-json-editor"); 4 | 5 | gulp.task('cover:clean', function (done) { 6 | return del('coverage', done); 7 | }); 8 | 9 | gulp.task('cover:enableconfig',() => { 10 | return gulp.src("./coverconfig.json") 11 | .pipe(jeditor(function(json) { 12 | json.enabled = true; 13 | return json; // must return JSON object. 14 | })) 15 | .pipe(gulp.dest("./out", {'overwrite':true})); 16 | }); 17 | 18 | gulp.task('cover:enable', gulp.series('cover:clean', 'cover:enableconfig')); 19 | 20 | gulp.task('cover:disable', () => { 21 | return gulp.src("./coverconfig.json") 22 | .pipe(jeditor(function(json) { 23 | json.enabled = false; 24 | return json; // must return JSON object. 25 | })) 26 | .pipe(gulp.dest("./out", {'overwrite':true})); 27 | }); 28 | 29 | // for running on the jenkins build system 30 | gulp.task('cover:jenkins', gulp.series('cover:clean', 'cover:enableconfig', 'ext:test')); -------------------------------------------------------------------------------- /tasks/packagetasks.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var fs = require('fs'); 3 | var cproc = require('child_process'); 4 | var del = require('del'); 5 | var path = require('path'); 6 | var serviceDownloader = require('@microsoft/ads-service-downloader'); 7 | 8 | 9 | function getServiceInstallConfig() { 10 | return require('../out/utils').getServiceInstallConfig(); 11 | } 12 | 13 | function getResolvedServiceInstallationPath(runtime) { 14 | return require('../out/utils').getResolvedServiceInstallationPath(runtime); 15 | } 16 | 17 | async function installService(runtime) { 18 | const config = getServiceInstallConfig(); 19 | const serverdownloader = new serviceDownloader.ServiceDownloadProvider(config); 20 | 21 | return serverdownloader.installService(runtime) 22 | } 23 | 24 | async function getOrDownloadServer() { 25 | const config = getServiceInstallConfig(); 26 | const serverdownloader = new serviceDownloader.ServerProvider(config); 27 | 28 | return serverdownloader.getOrDownloadServer() 29 | } 30 | 31 | gulp.task('ext:install-service', () => { 32 | return getOrDownloadServer(); 33 | }); 34 | 35 | function doPackageSync(packageName) { 36 | var vsceArgs = []; 37 | vsceArgs.push('vsce'); 38 | vsceArgs.push('package'); // package command 39 | vsceArgs.push('--yarn'); // to use yarn list instead on npm list 40 | 41 | if (packageName !== undefined) { 42 | vsceArgs.push('-o'); 43 | vsceArgs.push(packageName); 44 | } 45 | var command = vsceArgs.join(' '); 46 | console.log(command); 47 | return cproc.execSync(command); 48 | } 49 | 50 | function cleanServiceInstallFolder() { 51 | return new Promise((resolve, reject) => { 52 | const config = getServiceInstallConfig(); 53 | let root = path.join(__dirname, '../out/' + 'bin'); 54 | console.log('Deleting Service Install folder: ' + root); 55 | del(root + '/*').then(() => { 56 | resolve(); 57 | }).catch((error) => { 58 | reject(error) 59 | }); 60 | }); 61 | } 62 | 63 | function doOfflinePackage(runtimeId, runtime, packageName) { 64 | return installService(runtime).then(() => { 65 | return doPackageSync(packageName + '-' + runtimeId + '.vsix'); 66 | }); 67 | } 68 | 69 | //Install vsce to be able to run this task: npm install -g vsce 70 | gulp.task('package:online', () => { 71 | return cleanServiceInstallFolder().then(() => { 72 | doPackageSync(); 73 | return getOrDownloadServer(); 74 | }); 75 | }); 76 | 77 | //Install vsce to be able to run this task: npm install -g vsce 78 | gulp.task('package:offline', () => { 79 | var json = JSON.parse(fs.readFileSync('package.json')); 80 | var name = json.name; 81 | var version = json.version; 82 | var packageName = name + '-' + version; 83 | 84 | var packages = []; 85 | packages.push({rid: 'win-x64', runtime: 'Windows_64'}); 86 | packages.push({rid: 'osx', runtime: 'OSX'}); 87 | packages.push({rid: 'linux-x64', runtime: 'Linux'}); 88 | packages.push({rid: 'ubuntu22-x64', runtime: "Ubuntu_22"}) 89 | packages.push({rid: 'osx-arm64', runtime: "OSX_ARM64"}) 90 | 91 | var promise = Promise.resolve(); 92 | cleanServiceInstallFolder().then(() => { 93 | packages.forEach(data => { 94 | promise = promise.then(() => { 95 | return doOfflinePackage(data.rid, data.runtime, packageName).then(() => { 96 | return cleanServiceInstallFolder(); 97 | }); 98 | }); 99 | }); 100 | }); 101 | 102 | return promise; 103 | }); 104 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "target": "es6", 6 | "outDir": "out", 7 | "lib": [ 8 | "es6", "es2015.promise" 9 | ], 10 | "sourceMap": true, 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "declaration": true, 14 | "rootDir": "src" 15 | }, 16 | "exclude": [ 17 | "node_modules" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [ 4 | true, 5 | "parameters", 6 | "statements" 7 | ], 8 | "ban": false, 9 | "class-name": true, 10 | "comment-format": [ 11 | true, 12 | "check-space" 13 | ], 14 | "curly": true, 15 | "eofline": true, 16 | "forin": true, 17 | "indent": [ 18 | true, 19 | "tab" 20 | ], 21 | "interface-name": true, 22 | "jsdoc-format": true, 23 | "label-position": true, 24 | "label-undefined": true, 25 | "max-line-length": [ 26 | true, 27 | 160 28 | ], 29 | "member-access": false, 30 | "member-ordering": [ 31 | false, 32 | "static-before-instance", 33 | "variables-before-functions" 34 | ], 35 | "no-any": false, 36 | "no-arg": true, 37 | "no-bitwise": true, 38 | "no-conditional-assignment": true, 39 | "no-consecutive-blank-lines": false, 40 | "no-console": [ 41 | true, 42 | "debug", 43 | "info", 44 | "time", 45 | "timeEnd", 46 | "trace" 47 | ], 48 | "no-construct": true, 49 | "no-constructor-vars": false, 50 | "no-debugger": true, 51 | "no-duplicate-key": true, 52 | "no-duplicate-variable": true, 53 | "no-empty": true, 54 | "no-eval": true, 55 | "no-inferrable-types": false, 56 | "no-internal-module": true, 57 | "no-null-keyword": true, 58 | "no-require-imports": false, 59 | "no-shadowed-variable": true, 60 | "no-string-literal": false, 61 | "no-switch-case-fall-through": false, 62 | "no-trailing-whitespace": true, 63 | "no-unreachable": true, 64 | "no-unused-expression": false, 65 | "no-unused-variable": true, 66 | "no-use-before-declare": true, 67 | "no-var-keyword": true, 68 | "no-var-requires": false, 69 | "object-literal-sort-keys": false, 70 | "one-line": [ 71 | true, 72 | "check-open-brace", 73 | "check-catch", 74 | "check-else", 75 | "check-finally", 76 | "check-whitespace" 77 | ], 78 | "quotemark": [ 79 | true, 80 | "single", 81 | "avoid-escape" 82 | ], 83 | "radix": true, 84 | "semicolon": true, 85 | "switch-default": true, 86 | "trailing-comma": [ 87 | true, 88 | { 89 | "multiline": "never", 90 | "singleline": "never" 91 | } 92 | ], 93 | "triple-equals": [ 94 | true, 95 | "allow-null-check" 96 | ], 97 | "typedef": [ 98 | true, 99 | "call-signature", 100 | "property-declaration" 101 | ], 102 | "typedef-whitespace": [ 103 | true, 104 | { 105 | "call-signature": "nospace", 106 | "index-signature": "nospace", 107 | "parameter": "nospace", 108 | "property-declaration": "nospace", 109 | "variable-declaration": "nospace" 110 | } 111 | ], 112 | "use-strict": false, 113 | "variable-name": [ 114 | true, 115 | "allow-leading-underscore", 116 | "ban-keywords" 117 | ], 118 | "whitespace": [ 119 | true, 120 | "check-branch", 121 | "check-decl", 122 | "check-operator", 123 | "check-separator", 124 | "check-type" 125 | ] 126 | } 127 | } --------------------------------------------------------------------------------