Skip to content

Commit ce72820

Browse files
committed
add index
1 parent e283068 commit ce72820

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

cfxdb/mrealmschema.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ class IndexApplicationRealmByName(MapStringUuid):
3333
"""
3434

3535

36+
@table('0275b858-890c-4879-945c-720235b093d7')
37+
class IndexApplicationRealmByWebCluster(MapUuidStringUuid):
38+
"""
39+
Index: (webcluster_oid, arealm_name) -> arealm_oid
40+
"""
41+
42+
3643
#
3744
# Roles
3845
#
@@ -254,6 +261,11 @@ def __init__(self, db):
254261
"""
255262
"""
256263

264+
# idx_arealm_by_webcluster: IndexApplicationRealmByWebCluster
265+
idx_arealm_by_webcluster = None
266+
"""
267+
"""
268+
257269
# arealm_role_associations: ApplicationRealmRoleAssociation
258270
arealm_role_associations = None
259271
"""
@@ -374,6 +386,12 @@ def attach(db):
374386
schema.idx_arealms_by_name = db.attach_table(IndexApplicationRealmByName)
375387
schema.arealms.attach_index('idx1', schema.idx_arealms_by_name, lambda arealm: arealm.name)
376388

389+
schema.idx_arealm_by_webcluster = db.attach_table(IndexApplicationRealmByWebCluster)
390+
schema.arealms.attach_index('idx2',
391+
schema.idx_arealm_by_webcluster,
392+
lambda arealm: (arealm.webcluster_oid, arealm.name),
393+
nullable=True)
394+
377395
# roles
378396
schema.roles = db.attach_table(Roles)
379397

0 commit comments

Comments
 (0)