Skip to content

Separate DataAcc, which will only provide the GetDataConn method, from DataHub, which will only provide the Run and Txn methods. #64

Description

@sttk

Currently, DataAcc is an interface that declares the getDataConn method, and DataHub inherits from it. Therefore, a DataHub instance can use getDataConn directly, while a method that receives the instance as a DataAcc can also use run and txn by downcasting it to DataHub. This is a problematic design.

In the Go version of sabi, in order to change sabi.GetDataConn, sabi.Run, and sabi.Txn into the generic methods DataAcc#GetDataConn, DataHub#Run, and DataHub#Txn, I changed DataAcc from an interface to a struct and separated it from DataHub, which has a DataAcc instance as a field. This change eliminates the problematic design in the Go version.

Therefore, I'll make the same change to the Java version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions