Introduce DAL model ident formatter to simplify the interfaces
This commit is contained in:
@@ -296,13 +296,11 @@ func (svc *dalConnection) reloadConnections(ctx context.Context) (err error) {
|
||||
func (svc *dalConnection) makeConnectionMeta(ctx context.Context, c *types.DalConnection) (cm dal.ConnectionMeta, err error) {
|
||||
// @todo we could probably utilize connection params more here
|
||||
cm = dal.ConnectionMeta{
|
||||
ConnectionDefaults: dal.ConnectionDefaults{
|
||||
ModelIdent: c.Config.DefaultModelIdent,
|
||||
AttributeIdent: c.Config.DefaultAttributeIdent,
|
||||
PartitionFormat: c.Config.DefaultPartitionFormat,
|
||||
},
|
||||
SensitivityLevel: c.SensitivityLevel,
|
||||
Label: c.Handle,
|
||||
DefaultModelIdent: c.Config.DefaultModelIdent,
|
||||
DefaultAttributeIdent: c.Config.DefaultAttributeIdent,
|
||||
DefaultPartitionFormat: c.Config.DefaultPartitionFormat,
|
||||
SensitivityLevel: c.SensitivityLevel,
|
||||
Label: c.Handle,
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@@ -78,14 +78,6 @@ var (
|
||||
DalPrimaryConnectionResourceType = "corteza::system:primary_dal_connection"
|
||||
)
|
||||
|
||||
func (c DalConnection) ConnectionDefaults() dal.ConnectionDefaults {
|
||||
return dal.ConnectionDefaults{
|
||||
ModelIdent: c.Config.DefaultModelIdent,
|
||||
AttributeIdent: c.Config.DefaultAttributeIdent,
|
||||
PartitionFormat: c.Config.DefaultPartitionFormat,
|
||||
}
|
||||
}
|
||||
|
||||
func (c DalConnection) ActiveCapabilities() capabilities.Set {
|
||||
return c.Capabilities.Supported.
|
||||
Union(c.Capabilities.Enforced).
|
||||
|
||||
Reference in New Issue
Block a user