Skip to content

Commit

Permalink
prettier formatting in README
Browse files Browse the repository at this point in the history
  • Loading branch information
darthbear committed Apr 29, 2015
1 parent 2fab5ac commit 9861229
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Options:

**Create a table in Mysql and populate it**

```sql
mysql> CREATE TABLE employee(
id INT NOT NULL,
name VARCHAR(20) DEFAULT '(no name)' NOT NULL,
Expand All @@ -103,6 +104,7 @@ Options:
);

mysql> INSERT INTO employee(id, name, dept, age, height) VALUES (1, 'John Doe', 'IT', 28, 6.3),(1, 'Mary Gray', 'IT', 30, 6.8);
```

**Export the DDL definition**

Expand Down Expand Up @@ -162,6 +164,7 @@ Options:

**Convert DDL definition to CREATE TABLE statement for Postgres**

```sql
$ catdb ddl -d pg_testdb -t employee -i /tmp/employee.json -dr

CREATE TABLE employee (
Expand All @@ -172,6 +175,7 @@ Options:
height real,
created_on timestamp without time zone DEFAULT now()
);
```

**Export data**

Expand All @@ -183,10 +187,12 @@ Options:

**Import data (dry-run)**

```sql
$ catdb data -d pg_testdb -t employee -i /tmp/export.csv -dr
INSERT INTO employee (id,name,dept,age,height,created_on)
VALUES('1','John Doe','IT','28','6.3','2015-04-28 22:17:57'),
('1','Mary Gray','IT','30','6.8','2015-04-28 22:17:57');
```

### TODO

Expand Down

0 comments on commit 9861229

Please sign in to comment.