Tchater maintenant avec le support
Tchattez avec un ingénieur du support

Toad Edge 2.2 - User Guide

Repository

Version control systems (VCS) are not a part of database systems by default. However, Toad Edge® offers a way to apply version control to a database by mapping it to a file system as a folder structure where each object is represented by a JSON file. The resulting structure is referred to as a "repository". It can be tracked with any VCS and it can be also synchronized with any other database of the same platform and version using Schema Compare. Repository is available for MySQL and MariaDB.

To map a database to a file system

  1. Right-click a database in Object Explorer and select Repository | Map Database
  2. Enter the path to the destination folder where the database folder structure should be created

Your database is now mapped to the file system. The path to the folder structure is displayed next to the database icon in Object Explorer.

Object Explorer also displays the synchronization status of all objects in the database.

The following table lists all possible states indicated by the object decorators and the action suggested once you synchronize database and repository:

Decorator Cause Suggested action Description
A new object was added to database that is not present in repository Change target You added a new object to your database. Toad Edge assumes you want to add the object to your repository as well
An object was deleted from repository, but it still exists in database Change source You deleted an object in your repository. Toad Edge assumes you want to delete the object from your database as well
/ An object was probably modified in database / repository None You modified an object in your database / repository. These changes have been detected by Toad Edge but they have not been confirmed yet. To confirm and resolve them, Synchronize the database and the repository
/ An object was confirmed to be modified in database / repository Change source / target You modified an object in your database / repository and synchronized them afterwards. Toad Edge assumes that when you modify an object on one side you will want to modify on the other side as well.
An object was possibly modified in both database and repository None You modified an object in both your database and your repository. These changes have been detected by Toad Edge but they have not been confirmed yet. To confirm and resolve them, Synchronize the database and the repository
An object was confirmed to be modified in both database and repository Change both You modified an object in your database / repository and synchronized them afterwards. Toad Edge assumes that when you modify an object on both sides, you will want to decide which specific changes should be applied in the source and the target
An object has not been added to repository yet, its state is unknown Change target You mapped your database to a file system (repository), but you have not synchronized them yet. Synchronize the database and the repository in order to copy the objects from your database to the repository

To remove mapping of a database to a file system

  1. Right-click a database in Object Explorer and select Repository | Remove Mapping
  2. Confirm the removal. Optionally, you can check the Also delete file on disk checkbox to delete the remaining files in the file system

To synchronize a mapped database with a repository

  • Right-click a database that is mapped to a file system in Object Explorer and select Repository | Synchronize

The process of synchronization of a database and a repository is very similar to Schema Compare.
See About Schema Compare to learn more about the synchronization process.

NOTE: When synchronizing a database and a repository, it is currently not possible to use the Change both resolution action to resolve specific differences.

Data Export

Toad Edge allows you to export various data from Object Explorer, Object Detail and Describe Object and Result Set.

Exporting data from Object Explorer

There are two kinds of exports available in Object Explorer:

  • Export Script - exports the SQL create script for any object
  • Export Data - exports table records

You can export data in SQL (INSERT/MERGE ) or CSV format.

To export script of an object in Object Explorer

  1. Right-click an object and select Export Script
  2. Select Destination and configure Script Options

To export table data in Object Explorer

  1. Right-click a table and select Export Data
  2. In the first dialog of the wizard, you can Add other tables to the export. If your table is linked to other tables by a relationship, you can also Add Children/Parent tables
  3. In the next dialog, select the export format and its Destination
  4. The next dialog presents you with a grid where you can exclude specific data type columns from the export
  5. If you want to exclude specific columns rather than column data types, you can do so in the following dialog
  6. The last dialog contains a couple more SQL Settings. Once you are done with the configuration, click Finish
Exporting data from Object Detail and Result Set

There are two kinds of exports available in Object Detail | Data tab and Result Set:

  • Export Grid Selection - exports the rows that you have selected in grid
  • Export Query Result - exports the entire contents of the grid

You can export data in CSV and SQL (INSERT/MERGE statements) format. Grid selection can be additionally exported in HTML and XML format.

To export data from Object Detail or Result Set

  1. Open a table or a view in Object Detail | Data tab or execute a query to display the Result Set
  2. Right-click anywhere in the grid and select Export Grid Selection or Export Query Result
  3. If exporting to XML/HTML, simply choose the destination path and Save the export
  4. If exporting to CSV/SQL, select the format of the export and its Destination
  5. In the last dialog, configure the final SQL/CSV Settings to your liking and click Finish

Data Import

Importing data is the fastest way to populate your tables. Toad Edge offers data import from SQL (INSERT or MERGE statements) or CSV files. You can even import data from ZIP archives that contain these files.

Note: CSV file import currently allows importing data only into one table at a time.

To import data into a table:

  1. In Object Explorer, right-click the table you want to import data into and choose Import Data...
  2. In the Import Data wizard, choose the import file format, the Source path and encoding. The encoding field is editable in case encoding is not detected correctly
  3. The final dialog depends on whether you import a SQL or a CSV file:
    • SQL file - you can configure additional SQL Format Settings, for example, you may want to remove the database name from the code or open it in Worksheet
    • CSV file - you can configure various CSV Format Settings such as delimiters, date and time formats...
  4. Once you are done with the final configuration, click Finish

JSON Support and Editor

With Toad Edge you can view JSON columns structure clearly in multiple places and you can also edit specific JSON values using an editor with support of Content Assist, Quick Fixes, and other features that support native JSON (JavaScript Object Notation) data types.

To view JSON column values

  1. In Object Explorer, locate your database/schema and then the table that contains a JSON data type column
  2. Expand the table node, the columns node and then finally the node of the specific JSON column

To view detailed structure of JSON values

  1. Double-click any table in Object Explorer with a JSON data type column to open it in Object Detail)
  2. In Object Detail, switch to the Data tab
  3. Right-click a value and select Define in Editor to open the value in JSON Editor
  4. The structure of the specific JSON value is then displayed in Outline View
JSON Editor

To edit values in JSON Editor

  1. Double-click any table in Object Explorer with a JSON data type column to open it in Object Detail)
  2. In Object Detail, switch to the Data tab
  3. Open a JSON value in JSON Editor by either:
    • Right-clicking the value and selecting Define in Editor
    • Double-clicking the value and clicking the edit icon

JSON Editor has two especially notable features:

  • Content Assist (CTRL (⌘) + SPACE) - suggests JSON templates (see Templates for more information)
  • Quick Fix - offers simple solutions to syntax errors, use them by right-clicking an underlined part of the JSON value and selecting a fix
Toolbar button Name Description
Brackets Highlighting Toggles brackets highlighting. Corresponding starting/ending brackets are highlighted in the same color
Brackets Content Highlighting

Toggles brackets content highlighting. Bracket values of the same depth are highlighted in the same color

Vertical Layout Switches the editor into vertical layout
Horizontal Layout Switches the editor into horizontal layout
Apply Applies changes made to a value
Cancel Discards changes made to a value
Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation