Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Jul 21, 2023
1 parent b14c6e0 commit 4588776
Showing 1 changed file with 11 additions and 32 deletions.
43 changes: 11 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ Join our Discord server to chat with others in the SeaQL community!
The crate is divided into different modules:

+ `def`: type definitions
+ `query`: for querying information_schema
+ `parser`: for parsing information_schema (parsing sqldump is WIP)
+ `writer`: for exporting `Schema` into SeaQuery and SQL
+ `discovery`: query, parse and construct a `Schema`
+ `query`, `parser`: for querying and parsing information_schema
+ `discovery`: connect to a live database and discover a `Schema`
+ `writer`: for exporting `Schema` into SeaQuery and SQL statements

JSON de/serialize on type definitions can be enabled with `with-serde`.

Expand Down Expand Up @@ -72,9 +71,7 @@ TableDef {
NumericAttr {
maximum: None,
decimal: None,
unsigned: Some(
true,
),
unsigned: Some(true),
zero_fill: None,
},
),
Expand All @@ -96,9 +93,7 @@ TableDef {
NumericAttr {
maximum: None,
decimal: None,
unsigned: Some(
true,
),
unsigned: Some(true),
zero_fill: None,
},
),
Expand All @@ -116,18 +111,10 @@ TableDef {
},
ColumnInfo {
name: "last_update",
col_type: Timestamp(
TimeAttr {
fractional: None,
},
),
col_type: Timestamp(TimeAttr { fractional: None }),
null: false,
key: NotKey,
default: Some(
ColumnDefault {
expr: "CURRENT_TIMESTAMP",
},
),
default: Some(ColumnDefault::CurrentTimestamp),
extra: ColumnExtra {
auto_increment: false,
on_update_current_timestamp: true,
Expand Down Expand Up @@ -178,25 +165,17 @@ TableDef {
foreign_keys: [
ForeignKeyInfo {
name: "fk_film_actor_actor",
columns: [
"actor_id",
],
columns: [ "actor_id" ],
referenced_table: "actor",
referenced_columns: [
"actor_id",
],
referenced_columns: [ "actor_id" ],
on_update: Cascade,
on_delete: Restrict,
},
ForeignKeyInfo {
name: "fk_film_actor_film",
columns: [
"film_id",
],
columns: [ "film_id" ],
referenced_table: "film",
referenced_columns: [
"film_id",
],
referenced_columns: [ "film_id" ],
on_update: Cascade,
on_delete: Restrict,
},
Expand Down

0 comments on commit 4588776

Please sign in to comment.