Mercurial > hg > orthanc-tests
annotate PerfsDb/DbType.py @ 530:937bee4a2fe3
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 18 Apr 2023 17:14:01 +0200 |
parents | df1f9946571c |
children |
rev | line source |
---|---|
156 | 1 from enum import Enum |
2 | |
3 class DbType(Enum): | |
4 Sqlite = 1 | |
5 PG9 = 2 | |
6 MySQL = 3 | |
7 MSSQL = 4 | |
8 PG10 = 5 | |
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
9 PG11 = 5 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
10 SqlitePlugin = 6 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
11 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
12 def isPG(self): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
13 return self.value in [DbType.PG9.value, DbType.PG10.value, DbType.PG11.value] |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
14 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
15 def isSqlite(self): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
16 return self.value in [DbType.Sqlite.value, DbType.SqlitePlugin.value] |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
17 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
18 def isServer(self): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
156
diff
changeset
|
19 return not self.isSqlite() |