Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common-package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GSHS Utilities
common-package
Merge requests
!29
Develop
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Develop
develop
into
main
Overview
0
Commits
153
Pipelines
0
Changes
2
Closed
Huihui, Jonathan
requested to merge
develop
into
main
1 year ago
Overview
0
Commits
153
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Viewing commit
f65b6ccb
Prev
Next
Show latest version
2 files
+
7
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
f65b6ccb
adding sqlite to multidb
· f65b6ccb
MacFarland
authored
10 months ago
src/common/mixins/multiple.py
+
6
−
1
Options
@@ -73,7 +73,7 @@ class MultiDatabase:
@staticmethod
def
_get_mixin_for_type
(
db_type
:
str
,
)
->
Optional
[
Type
[
Union
[
"
PostgresMixin
"
,
"
MSSQLMixin
"
,
"
InfluxMixin
"
]]]:
)
->
Optional
[
Type
[
Union
[
'
PostgresMixin
'
,
'
MSSQLMixin
'
,
'
InfluxMixin
'
,
'
SQLiteMixin
'
]]]:
db_type
=
db_type
.
lower
()
if
db_type
.
startswith
(
"
postgres
"
)
or
db_type
.
startswith
(
"
pg
"
):
from
common.mixins.postgres
import
PostgresMixin
@@ -87,6 +87,11 @@ class MultiDatabase:
from
common.mixins.influx
import
InfluxMixin
return
InfluxMixin
if
db_type
.
startswith
(
'
sqlite
'
):
from
common.mixins.sqlite
import
SQLiteMixin
return
SQLiteMixin
# add more database Mixins here as they become available
return
None
Loading