gibson-cli 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. bin/clean.sh +3 -0
  2. gibson/api/BaseApi.py +2 -1
  3. gibson/api/Cli.py +9 -2
  4. gibson/command/Build.py +60 -8
  5. gibson/command/Help.py +0 -12
  6. gibson/command/Question.py +4 -7
  7. gibson/command/code/Code.py +42 -12
  8. gibson/command/code/Entity.py +25 -7
  9. gibson/command/code/Model.py +1 -1
  10. gibson/command/code/Schema.py +1 -1
  11. gibson/command/code/Test.py +35 -0
  12. gibson/command/code/Tests.py +12 -21
  13. gibson/command/importer/Import.py +83 -11
  14. gibson/command/importer/OpenApi.py +4 -9
  15. gibson/command/new/Module.py +1 -1
  16. gibson/command/new/New.py +3 -3
  17. gibson/command/new/Project.py +2 -2
  18. gibson/command/rewrite/Rewrite.py +9 -14
  19. gibson/command/tests/test_command_Conf.py +1 -0
  20. gibson/conf/Project.py +1 -0
  21. gibson/core/Configuration.py +21 -58
  22. gibson/core/Conversation.py +25 -7
  23. gibson/data/bash-completion.tmpl +3 -4
  24. gibson/data/postgresql/default-ref-table.tmpl +4 -0
  25. gibson/data/postgresql/default-table.tmpl +5 -0
  26. gibson/db/TableExceptions.py +3 -0
  27. gibson/db/tests/test_db_TableExceptions.py +4 -0
  28. gibson/services/code/context/schema/EntityKeys.py +3 -3
  29. gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +3 -3
  30. gibson/structure/Entity.py +12 -109
  31. gibson/structure/mysql/Entity.py +117 -0
  32. gibson/structure/{constraints → mysql/constraints}/ReferenceConstraint.py +6 -2
  33. gibson/structure/{keys → mysql/keys}/ForeignKey.py +9 -5
  34. gibson/structure/{keys → mysql/keys}/Index.py +7 -3
  35. gibson/structure/{keys/tests/test_ForeignKey.py → mysql/keys/tests/test_structure_mysql_keys_ForeignKey.py} +16 -8
  36. gibson/structure/{keys/tests/test_Index.py → mysql/keys/tests/test_structure_mysql_keys_Index.py} +7 -3
  37. gibson/structure/{keys/tests/test_IndexAttribute.py → mysql/keys/tests/test_structure_mysql_keys_IndexAttribute.py} +1 -1
  38. gibson/structure/mysql/testing.py +231 -0
  39. gibson/structure/{tests/test_Entity.py → mysql/tests/test_structure_mysql_Entity.py} +34 -20
  40. gibson/structure/postgresql/Entity.py +108 -0
  41. gibson/structure/postgresql/References.py +61 -0
  42. gibson/structure/postgresql/table/ForeignKey.py +28 -0
  43. gibson/structure/postgresql/table/tests/test_structure_postgresql_table_ForeignKey.py +44 -0
  44. gibson/structure/{testing.py → postgresql/testing.py} +45 -82
  45. gibson/structure/postgresql/tests/test_structure_postgresql_Entity.py +82 -0
  46. gibson/structure/tests/test_structure_Entity.py +22 -0
  47. {gibson_cli-0.6.0.dist-info → gibson_cli-0.7.0.dist-info}/METADATA +76 -27
  48. {gibson_cli-0.6.0.dist-info → gibson_cli-0.7.0.dist-info}/RECORD +58 -47
  49. {gibson_cli-0.6.0.dist-info → gibson_cli-0.7.0.dist-info}/WHEEL +1 -1
  50. gibson/command/rewrite/Tests.py +0 -26
  51. /gibson/command/{rewrite → code}/Api.py +0 -0
  52. /gibson/command/{rewrite → code}/Base.py +0 -0
  53. /gibson/command/{rewrite → code}/Models.py +0 -0
  54. /gibson/command/{rewrite → code}/Schemas.py +0 -0
  55. /gibson/data/{default-ref-table.tmpl → mysql/default-ref-table.tmpl} +0 -0
  56. /gibson/data/{default-table.tmpl → mysql/default-table.tmpl} +0 -0
  57. /gibson/structure/{keys → mysql/keys}/IndexAttribute.py +0 -0
  58. {gibson_cli-0.6.0.dist-info → gibson_cli-0.7.0.dist-info}/entry_points.txt +0 -0
  59. {gibson_cli-0.6.0.dist-info → gibson_cli-0.7.0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  import pytest
2
2
 
3
- from gibson.structure.constraints.ReferenceConstraint import ReferenceConstraint
4
- from gibson.structure.keys.ForeignKey import ForeignKey
3
+ from gibson.structure.mysql.constraints.ReferenceConstraint import ReferenceConstraint
4
+ from gibson.structure.mysql.keys.ForeignKey import ForeignKey
5
5
 
6
6
 
7
7
  def test_sql_exceptions():
@@ -65,16 +65,24 @@ def test_json():
65
65
 
66
66
  assert foreign_key.json() == {
67
67
  "attributes": ["c", "d"],
68
- "name": "abc_def_fk",
69
- "reference": {
68
+ "datastore": {
69
+ "specifics": {
70
+ "name": "abc_def_fk",
71
+ "relationship": {"type": None},
72
+ "symbol": "foreign_key_symbol",
73
+ }
74
+ },
75
+ "references": {
70
76
  "attributes": ["a", "b"],
71
- "match": None,
77
+ "datastore": {
78
+ "specifics": {
79
+ "match": None,
80
+ }
81
+ },
82
+ "entity": {"name": "other_table", "schema_": None},
72
83
  "on": {"delete": None, "update": None},
73
- "references": "other_table",
74
84
  "sql": "references other_table (a, b)",
75
85
  },
76
- "relationship": {"type": None},
77
86
  "sql": "constraint foreign_key_symbol foreign key abc_def_fk (c, d) "
78
87
  + "references other_table (a, b)",
79
- "symbol": "foreign_key_symbol",
80
88
  }
@@ -1,6 +1,6 @@
1
1
  import pytest
2
2
 
3
- from gibson.structure.keys.Index import Index
3
+ from gibson.structure.mysql.keys.Index import Index
4
4
 
5
5
 
6
6
  def test_sql_exceptions():
@@ -92,7 +92,11 @@ def test_json():
92
92
 
93
93
  assert index.json() == {
94
94
  "attributes": ["a", "b"],
95
- "name": "abc_def_idx",
95
+ "datastore": {
96
+ "specifics": {
97
+ "name": "abc_def_idx",
98
+ "using": "btree",
99
+ }
100
+ },
96
101
  "sql": "index abc_def_idx using btree (a, b)",
97
- "using": "btree",
98
102
  }
@@ -1,4 +1,4 @@
1
- from gibson.structure.keys.IndexAttribute import IndexAttribute
1
+ from gibson.structure.mysql.keys.IndexAttribute import IndexAttribute
2
2
 
3
3
 
4
4
  def test_sql():
@@ -0,0 +1,231 @@
1
+ from gibson.structure.mysql.Entity import Entity
2
+
3
+
4
+ def structure_testing_get_entity():
5
+ entity = Entity()
6
+ entity.attributes = [
7
+ {
8
+ "check": None,
9
+ "datastore": {
10
+ "specifics": {
11
+ "as_": None,
12
+ "bytes_": None,
13
+ "comment": None,
14
+ "extra": {"increment": {"auto": True}},
15
+ "on": None,
16
+ "reference": None,
17
+ "unsigned": None,
18
+ "values": None,
19
+ }
20
+ },
21
+ "data_type": {"formatted": "bigint", "raw": "bigint"},
22
+ "default": None,
23
+ "key": {"index": None, "primary": True, "unique": None},
24
+ "length": None,
25
+ "name": "id",
26
+ "nullable": False,
27
+ "numeric": {"precision": None, "scale": None},
28
+ "sql": "id bigint not null auto_increment primary key",
29
+ },
30
+ {
31
+ "check": None,
32
+ "datastore": {
33
+ "specifics": {
34
+ "as_": None,
35
+ "bytes_": None,
36
+ "comment": None,
37
+ "extra": {"increment": {"auto": None}},
38
+ "on": None,
39
+ "reference": None,
40
+ "unsigned": None,
41
+ "values": None,
42
+ }
43
+ },
44
+ "data_type": {"formatted": "varchar(36)", "raw": "varchar"},
45
+ "default": None,
46
+ "key": {"index": None, "primary": None, "unique": True},
47
+ "length": 36,
48
+ "name": "uuid",
49
+ "nullable": False,
50
+ "numeric": {"precision": None, "scale": None},
51
+ "sql": "uuid varchar(36) not null unique key",
52
+ },
53
+ {
54
+ "check": None,
55
+ "datastore": {
56
+ "specifics": {
57
+ "as_": None,
58
+ "bytes_": None,
59
+ "comment": None,
60
+ "extra": {"increment": {"auto": None}},
61
+ "on": None,
62
+ "reference": None,
63
+ "unsigned": None,
64
+ "values": None,
65
+ }
66
+ },
67
+ "data_type": {"formatted": "datetime", "raw": "datetime"},
68
+ "default": "current_timestamp",
69
+ "key": {"index": None, "primary": None, "unique": None},
70
+ "length": None,
71
+ "name": "date_created",
72
+ "nullable": False,
73
+ "numeric": {"precision": None, "scale": None},
74
+ "sql": "date_created datetime not null default current_timestamp",
75
+ },
76
+ {
77
+ "check": None,
78
+ "datastore": {
79
+ "specifics": {
80
+ "as_": None,
81
+ "bytes_": None,
82
+ "comment": None,
83
+ "extra": {"increment": {"auto": None}},
84
+ "on": "update current_timestamp",
85
+ "reference": None,
86
+ "unsigned": None,
87
+ "values": None,
88
+ }
89
+ },
90
+ "data_type": {"formatted": "datetime", "raw": "datetime"},
91
+ "default": "null",
92
+ "key": {"index": None, "primary": None, "unique": None},
93
+ "length": None,
94
+ "name": "date_updated",
95
+ "nullable": None,
96
+ "numeric": {"precision": None, "scale": None},
97
+ "sql": "date_updated datetime default null on update current_timestamp",
98
+ },
99
+ ]
100
+ entity.constraints = {"check": []}
101
+ entity.keys = {"foreign": [], "index": [], "primary": None, "unique": []}
102
+ entity.name = "abc_def"
103
+ entity.table = {
104
+ "parameters": {
105
+ "auto": None,
106
+ "charset": None,
107
+ "collate": None,
108
+ "default": None,
109
+ "engine": None,
110
+ "sql": None,
111
+ }
112
+ }
113
+
114
+ return entity
115
+
116
+
117
+ def structure_testing_get_struct_data():
118
+ return {
119
+ "entity": {
120
+ "name": "abc_def",
121
+ "struct": {
122
+ "attributes": [
123
+ {
124
+ "check": None,
125
+ "datstore": {
126
+ "specifics": {
127
+ "as_": None,
128
+ "bytes_": None,
129
+ "comment": None,
130
+ "extra": {"increment": {"auto": True}},
131
+ "on": None,
132
+ "reference": None,
133
+ "unsigned": None,
134
+ "values": None,
135
+ }
136
+ },
137
+ "data_type": {"formatted": "bigint", "raw": "bigint"},
138
+ "default": None,
139
+ "key": {"index": None, "primary": True, "unique": None},
140
+ "length": None,
141
+ "name": "id",
142
+ "nullable": False,
143
+ "numeric": {"precision": None, "scale": None},
144
+ "sql": "id bigint not null auto_increment primary key",
145
+ },
146
+ {
147
+ "check": None,
148
+ "datastore": {
149
+ "specifics": {
150
+ "as_": None,
151
+ "bytes_": None,
152
+ "comment": None,
153
+ "extra": {"increment": {"auto": None}},
154
+ "on": None,
155
+ "reference": None,
156
+ "unsigned": None,
157
+ "values": None,
158
+ }
159
+ },
160
+ "data_type": {"formatted": "varchar(36)", "raw": "varchar"},
161
+ "default": None,
162
+ "key": {"index": None, "primary": None, "unique": True},
163
+ "length": 36,
164
+ "name": "uuid",
165
+ "nullable": False,
166
+ "numeric": {"precision": None, "scale": None},
167
+ "sql": "uuid varchar(36) not null unique key",
168
+ },
169
+ {
170
+ "check": None,
171
+ "datastore": {
172
+ "specifics": {
173
+ "as_": None,
174
+ "bytes_": None,
175
+ "comment": None,
176
+ "extra": {"increment": {"auto": None}},
177
+ "on": None,
178
+ "reference": None,
179
+ "unsigned": None,
180
+ "values": None,
181
+ }
182
+ },
183
+ "data_type": {"formatted": "datetime", "raw": "datetime"},
184
+ "default": "current_timestamp",
185
+ "key": {"index": None, "primary": None, "unique": None},
186
+ "length": None,
187
+ "name": "date_created",
188
+ "nullable": False,
189
+ "numeric": {"precision": None, "scale": None},
190
+ "sql": "date_created datetime not null default current_timestamp",
191
+ },
192
+ {
193
+ "check": None,
194
+ "datastore": {
195
+ "specifics": {
196
+ "as_": None,
197
+ "bytes_": None,
198
+ "comment": None,
199
+ "extra": {"increment": {"auto": None}},
200
+ "on": "update current_timestamp",
201
+ "reference": None,
202
+ "unsigned": None,
203
+ "values": None,
204
+ }
205
+ },
206
+ "data_type": {"formatted": "datetime", "raw": "datetime"},
207
+ "default": "null",
208
+ "key": {"index": None, "primary": None, "unique": None},
209
+ "length": None,
210
+ "name": "date_updated",
211
+ "nullable": None,
212
+ "numeric": {"precision": None, "scale": None},
213
+ "sql": "date_updated datetime default null on update "
214
+ + "current_timestamp",
215
+ },
216
+ ],
217
+ "constraints": {"check": []},
218
+ "keys": {"foreign": [], "index": [], "primary": None, "unique": []},
219
+ "table": {
220
+ "parameters": {
221
+ "auto": None,
222
+ "charset": None,
223
+ "collate": None,
224
+ "default": None,
225
+ "engine": None,
226
+ "sql": None,
227
+ },
228
+ },
229
+ },
230
+ }
231
+ }
@@ -1,10 +1,10 @@
1
1
  import pytest
2
2
 
3
- from gibson.structure.constraints.ReferenceConstraint import ReferenceConstraint
4
- from gibson.structure.Entity import Entity
5
- from gibson.structure.keys.ForeignKey import ForeignKey
6
- from gibson.structure.keys.Index import Index
7
- from gibson.structure.testing import (
3
+ from gibson.structure.mysql.constraints.ReferenceConstraint import ReferenceConstraint
4
+ from gibson.structure.mysql.Entity import Entity
5
+ from gibson.structure.mysql.keys.ForeignKey import ForeignKey
6
+ from gibson.structure.mysql.keys.Index import Index
7
+ from gibson.structure.mysql.testing import (
8
8
  structure_testing_get_entity,
9
9
  structure_testing_get_struct_data,
10
10
  )
@@ -25,17 +25,25 @@ def test_add_foreign_key():
25
25
  assert entity.keys["foreign"] == [
26
26
  {
27
27
  "attributes": ["c", "d"],
28
- "name": None,
29
- "reference": {
28
+ "datastore": {
29
+ "specifics": {
30
+ "name": None,
31
+ "relationship": {"type": None},
32
+ "symbol": None,
33
+ }
34
+ },
35
+ "references": {
30
36
  "attributes": ["a", "b"],
31
- "match": None,
37
+ "datastore": {
38
+ "specifics": {
39
+ "match": None,
40
+ }
41
+ },
42
+ "entity": {"name": "abc_def", "schema_": None},
32
43
  "on": {"delete": None, "update": None},
33
- "references": "abc_def",
34
44
  "sql": "references abc_def (a, b)",
35
45
  },
36
- "relationship": {"type": None},
37
46
  "sql": "foreign key (c, d) references abc_def (a, b)",
38
- "symbol": None,
39
47
  }
40
48
  ]
41
49
 
@@ -72,9 +80,13 @@ def test_add_index():
72
80
  assert entity.keys["index"] == [
73
81
  {
74
82
  "attributes": ["abc", "def"],
75
- "name": None,
83
+ "datastore": {
84
+ "specifics": {
85
+ "name": None,
86
+ "using": None,
87
+ }
88
+ },
76
89
  "sql": "index (abc, def)",
77
- "using": None,
78
90
  }
79
91
  ]
80
92
 
@@ -97,11 +109,13 @@ def test_import_from_struct():
97
109
  assert entity.attributes[3]["name"] == "date_updated"
98
110
  assert entity.constraints == {"check": []}
99
111
  assert entity.keys == {"foreign": [], "index": [], "primary": None, "unique": []}
100
- assert entity.parameters == {
101
- "auto": None,
102
- "charset": None,
103
- "collate": None,
104
- "default": None,
105
- "engine": None,
106
- "sql": None,
112
+ assert entity.table == {
113
+ "parameters": {
114
+ "auto": None,
115
+ "charset": None,
116
+ "collate": None,
117
+ "default": None,
118
+ "engine": None,
119
+ "sql": None,
120
+ }
107
121
  }
@@ -0,0 +1,108 @@
1
+ from gibson.structure.postgresql.table.ForeignKey import ForeignKey
2
+
3
+
4
+ class Entity:
5
+ def __init__(self):
6
+ self.attributes = None
7
+ self.constraints = None
8
+ self.keys = None
9
+ self.name = None
10
+ self.table = None
11
+
12
+ def add_attribute(self, name, data_type, after=None, before=None):
13
+ was_added = False
14
+
15
+ json = {
16
+ "check": None,
17
+ "datastore": {
18
+ "specifics": {
19
+ "references": None,
20
+ }
21
+ },
22
+ "data_type": {
23
+ "formatted": data_type,
24
+ "raw": data_type,
25
+ },
26
+ "default": None,
27
+ "key": {"index": None, "primary": None, "unique": None},
28
+ "length": None,
29
+ "name": name,
30
+ "nullable": None,
31
+ "numeric": {
32
+ "precision": None,
33
+ "scale": None,
34
+ },
35
+ "sql": f"{name} {data_type}",
36
+ }
37
+
38
+ attributes = []
39
+ for attribute in self.attributes:
40
+ if was_added is False and attribute["name"] == after:
41
+ was_added = True
42
+ attributes.append(attribute)
43
+ attributes.append(json)
44
+ elif was_added is False and attribute["name"] == before:
45
+ was_added = True
46
+ attributes.append(json)
47
+ attributes.append(attribute)
48
+ else:
49
+ attributes.append(attribute)
50
+
51
+ if was_added is False:
52
+ attributes.append(json)
53
+
54
+ self.attributes = attributes
55
+ return self
56
+
57
+ def add_foreign_key(self, foreign_key: ForeignKey):
58
+ self.keys["foreign"].append(foreign_key.json())
59
+ return self
60
+
61
+ def add_index(self, index: object):
62
+ return self
63
+
64
+ def create_statement(self):
65
+ parts = []
66
+ for attribute in self.attributes:
67
+ parts.append(" " + attribute["sql"])
68
+
69
+ if self.keys["primary"] is not None:
70
+ parts.append(" " + self.keys["primary"]["sql"])
71
+
72
+ for unique_key in self.keys["unique"]:
73
+ parts.append(" " + unique_key["sql"])
74
+
75
+ for index in self.keys["index"]:
76
+ parts.append(" " + index["sql"])
77
+
78
+ for fk in self.keys["foreign"]:
79
+ parts.append(" " + fk["sql"])
80
+
81
+ for check in self.constraints["check"]:
82
+ parts.append(" " + check["sql"])
83
+
84
+ parameters = ""
85
+ if self.table["parameters"] and self.table["parameters"].get("sql"):
86
+ parameters = " " + self.table["parameters"].get("sql")
87
+
88
+ return (
89
+ f"create table if not exists {self.name}(\n"
90
+ + ",\n".join(parts)
91
+ + f"\n){parameters}"
92
+ )
93
+
94
+ def import_from_struct(self, data: dict):
95
+ if "name" in data and "struct" in data:
96
+ self.name = data["name"]
97
+
98
+ for key in data["struct"].keys():
99
+ setattr(self, key, data["struct"][key])
100
+ elif "entity" in data and "struct" in data["entity"]:
101
+ self.name = data["entity"]["name"]
102
+
103
+ for key in data["entity"]["struct"].keys():
104
+ setattr(self, key, data["entity"]["struct"][key])
105
+ else:
106
+ raise RuntimeError("cannot import from struct, incorrect data format")
107
+
108
+ return self
@@ -0,0 +1,61 @@
1
+ class References:
2
+ def __init__(self):
3
+ self.columns = []
4
+ self.match_full = None
5
+ self.match_partial = None
6
+ self.match_simple = None
7
+ self.on_delete = None
8
+ self.on_update = None
9
+ self.ref_schema = None
10
+ self.ref_table = None
11
+
12
+ def json(self):
13
+ return {
14
+ "attributes": self.columns,
15
+ "datastore": {
16
+ "specifics": {
17
+ "match": {
18
+ "full": self.match_full,
19
+ "partial": self.match_partial,
20
+ "simple": self.match_simple,
21
+ },
22
+ }
23
+ },
24
+ "entity": {"name": self.ref_table, "schema_": self.ref_schema},
25
+ "on": {"delete": self.on_delete, "update": self.on_update},
26
+ "sql": self.sql(),
27
+ }
28
+
29
+ def sql(self):
30
+ parts = []
31
+
32
+ ref_table = []
33
+ if self.ref_schema is not None:
34
+ ref_table.append(self.ref_schema)
35
+ ref_table.append(self.ref_table)
36
+
37
+ if self.ref_table is not None:
38
+ parts.append(".".join(ref_table))
39
+
40
+ if self.columns != []:
41
+ parts.append("(" + ", ".join(self.columns) + ")")
42
+
43
+ if self.match_full is True:
44
+ parts.append("match full")
45
+
46
+ if self.match_partial is True:
47
+ parts.append("match partial")
48
+
49
+ if self.match_simple is True:
50
+ parts.append("match simple")
51
+
52
+ if self.on_delete is not None:
53
+ parts.append(f"on delete {self.on_delete}")
54
+
55
+ if self.on_update is not None:
56
+ parts.append(f"on update {self.on_update}")
57
+
58
+ if parts == []:
59
+ return ""
60
+
61
+ return ("references " + " ".join(parts)).lstrip().rstrip()
@@ -0,0 +1,28 @@
1
+ class ForeignKey:
2
+ def __init__(self):
3
+ self.columns = []
4
+ self.references = None
5
+ self.relationship = None
6
+
7
+ def json(self):
8
+ return {
9
+ "attributes": self.columns,
10
+ "references": self.references.json()
11
+ if self.references is not None
12
+ else None,
13
+ "sql": self.sql(),
14
+ }
15
+
16
+ def sql(self):
17
+ parts = []
18
+
19
+ if self.columns != []:
20
+ parts.append("(" + ", ".join(self.columns) + ")")
21
+
22
+ if self.references is not None:
23
+ parts.append(self.references.sql())
24
+
25
+ if parts == []:
26
+ return ""
27
+
28
+ return ("foreign key " + " ".join(parts)).lstrip().rstrip()
@@ -0,0 +1,44 @@
1
+ import pytest
2
+
3
+ from gibson.structure.postgresql.References import References
4
+ from gibson.structure.postgresql.table.ForeignKey import ForeignKey
5
+
6
+
7
+ def test_sql():
8
+ references = References()
9
+ references.columns = ["a", "b"]
10
+ references.ref_table = "other_table"
11
+
12
+ foreign_key = ForeignKey()
13
+ foreign_key.references = references
14
+
15
+ foreign_key.columns = ["a", "b"]
16
+
17
+ assert foreign_key.sql() == "foreign key (a, b) references other_table (a, b)"
18
+
19
+
20
+ def test_json():
21
+ references = References()
22
+ references.columns = ["a", "b"]
23
+ references.match_full = True
24
+ references.match_partial = False
25
+ references.match_simple = True
26
+ references.ref_table = "other_table"
27
+
28
+ foreign_key = ForeignKey()
29
+ foreign_key.columns = ["c", "d"]
30
+ foreign_key.references = references
31
+
32
+ assert foreign_key.json() == {
33
+ "attributes": ["c", "d"],
34
+ "references": {
35
+ "attributes": ["a", "b"],
36
+ "datastore": {
37
+ "specifics": {"match": {"full": True, "partial": False, "simple": True}}
38
+ },
39
+ "entity": {"name": "other_table", "schema_": None},
40
+ "on": {"delete": None, "update": None},
41
+ "sql": "references other_table (a, b) match full match simple",
42
+ },
43
+ "sql": "foreign key (c, d) references other_table (a, b) match full match simple",
44
+ }