diff --git a/CHANGELOG.md b/CHANGELOG.md index b7493984b0f992ca9a38ad2a3601ca5d0dabafa1..f214770b3876f99ce7d5fb7da37f7d4f436e21ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [1.0.0] - 2020-06-20 +## [1.0.1] - 2020-02-22 +### Fixed +- No declaration files. + +## [1.0.0] - 2020-02-22 ### Added - Support Databases: - DB2 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e306010651a18db83b1a1c610dbd8c9092ce7278 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Steven N. Yang(steven_nyang@outlook.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index b1d170e7136ad0faa175c42140888ec4e4971e6d..2a6fb6be010246100a90a7cd6ce239edada0c52b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Now, you may define your database tables in markdown files, and this utility wil ## Release Notes -### 1.0.0 +### 1.0.1 Initial release of `database modeling markdown` [Change Log](CHANGELOG.md) @@ -60,38 +60,36 @@ CREATE TABLE Departments ( ## Sample Code ```typescript -import { DatabaseTypes } from "../src/services/databaseTypes"; -import { DbmService } from "../src/services/dbmService"; -import { DbmOptions } from "../src/services/dbmOptions"; +import { DatabaseTypes, DbmService, DbmOptions } from 'db-modeling-markdown; -import path = require("path"); +import path = require('path'); const context: DbmOptions = new DbmOptions(); context.database = DatabaseTypes.mysql; -context.sourceFolder = path.join(__dirname, "../tests/data/mysql/tables"); +context.sourceFolder = path.join(__dirname, '../tests/data/mysql/tables'); // Read table definition markdow files(.db.md), and produce a sql file with create-table-if-not-exists scripts -context.targetPath = path.join(__dirname, "../tmp/createTableIf.sql"); +context.targetPath = path.join(__dirname, '../tmp/createTableIf.sql'); DbmService.toCreateTableIfNotExistsSql(context); // Read table definition markdow files(.db.md), and produce a sql file with create-table scripts -context.targetPath = path.join(__dirname, "../tmp/createTable.sql"); +context.targetPath = path.join(__dirname, '../tmp/createTable.sql'); DbmService.toCreateTableSql(context); // Read table definition markdow files(.db.md), and produce a sql file with drop-table scripts -context.targetPath = path.join(__dirname, "../tmp/dropTable.sql"); +context.targetPath = path.join(__dirname, '../tmp/dropTable.sql'); DbmService.toDropTableSql(context); // Read table definition markdow files(.db.md), and produce a sql file with drop-then-create-table scripts -context.targetPath = path.join(__dirname, "../tmp/dropThenCreatTable.sql"); +context.targetPath = path.join(__dirname, '../tmp/dropThenCreatTable.sql'); DbmService.toDropThenCreateTableSql(context); // Read table definition markdow files(.db.md), and produce a json file -context.targetPath = path.join(__dirname, "../tmp/model.json"); +context.targetPath = path.join(__dirname, '../tmp/model.json'); DbmService.toJson(context); // Read table definition markdow files(.db.md), and produce a model object -context.targetPath = ""; +context.targetPath = ''; const model = DbmService.toModel(context); console.log(JSON.stringify(model, null, 2)); ``` diff --git a/docs/classes/_dialects_core_dbprovider_.dbprovider.html b/docs/classes/_dialects_core_dbprovider_.dbprovider.html index e15286298cb7663413dd439b81ca23f68074eb1c..1dc4db0c82a67ba6ae68fccd12d614558b2750c3 100644 --- a/docs/classes/_dialects_core_dbprovider_.dbprovider.html +++ b/docs/classes/_dialects_core_dbprovider_.dbprovider.html @@ -3,7 +3,7 @@
-Initial release of database modeling markdown
Change Log