You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docsource/faq.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,15 @@ You might want to create a settings class as well in case you need some specific
17
17
18
18
### Create your `ColumnMocks`
19
19
20
-
Your database system might support specific database types. In order to make them available as column types, you can use the `sql_mock.column_mocks.ColumnMock` class as a base and inherit your specific column types from it.
20
+
Your database system might support specific database types. In order to make them available as column types, you can use the `sql_mock.column_mocks.BaseColumnMock` class as a base and inherit your specific column types from it.
21
21
For most of your column mocks you might only need to specify the `dtype` that should be used to parse the inputs.
22
22
23
-
A good practise is to create a `ColumnMock` class that is specific to your database and inherit all your column types from it, e.g.:
23
+
A good practise is to create a `BaseColumnMock` class that is specific to your database and inherit all your column types from it, e.g.:
24
24
25
25
```python
26
-
from sql_mock.column_mocks importColumnMock
26
+
from sql_mock.column_mocks importBaseColumnMock
27
27
28
-
classMyFanceDatabaseColumnMock(ColumnMock):
28
+
classMyFanceDatabaseColumnMock(BaseColumnMock):
29
29
# In case you need some specific logic that overwrites the default behavior, you can do so here
30
30
pass
31
31
@@ -41,11 +41,11 @@ class String(MyFanceDatabaseColumnMock):
41
41
There will definitely be folks in the community that are in the need of support for the database you just created all the setup for.
42
42
Feel free to create a PR on this repository that we can start supporting your database system!
43
43
44
-
## I am missing a specific ColumnMock type for my model fields
44
+
## I am missing a specific BaseColumnMock type for my model fields
45
45
46
46
We implemented some basic column types but it could happen that you don't find the one you need.
47
47
Luckily, you can easily create those with the tools provided.
48
-
The only thing you need to do is to inherit from the `ColumnMock` that is specific to your database system (e.g. `BigQueryColumnMock`) and write classes for the column mocks you are missing. Usually you only need to set the correct `dtype`. This would later be used in the `cast(col to <dtype>)` expression.
48
+
The only thing you need to do is to inherit from the `BaseColumnMock` that is specific to your database system (e.g. `BigQueryColumnMock`) and write classes for the column mocks you are missing. Usually you only need to set the correct `dtype`. This would later be used in the `cast(col to <dtype>)` expression.
49
49
50
50
```python
51
51
# Replace the import with the database system you are using
0 commit comments