Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问下core里面的jdbc包下的TConnection或者TStatement为什么要用adapter? #3

Open
ghost opened this issue Dec 21, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2016

public abstract class UnsupportedStatementAdapter implements Statement
public class TStatement extends UnsupportedStatementAdapter

为什么要有adapter这个中间类?

@ghost
Copy link
Author

ghost commented Dec 21, 2016

@sidawei

@sidawei
Copy link
Contributor

sidawei commented Dec 26, 2016

你好 这个主要是因为TStatement中并没有实现Statement中的全部方法,一些不支持的方法是直接抛出异常的。 为了避免TStatement中有很多这种未实现方法影响可读性,所以把这些方法抽取到了父类中,此外暂时无其他作用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant