Posing an EoD SQL Question

So here’s the question (and first post in a very long time):

Who would like to see EoD SQL opened up even more?

EoD SQL at the moment is open-source, but even an open-source project is in a way: closed. To add new functionality to EoD SQL you need to climb into the source code. So here’s the idea:

A new MethodImplementationFactory interface that you can implement to provide functionality for a single type of method that could exist in a Query interface. It would look something like this:

public interface MethodImplementationFactory {
    public Class<? extends Annotation> getAnnotationType();

    public void validate(Method method) throws InvalidQueryException, InvalidDataTypeException;

    public MethodImplementation create(QueryImplementation implementation, Method method);

The MethodImplementation itself will be an interface (in a way) a lot like java.lang.reflect.Invocationhandler, as it will be the object called to fulfil a method invocation on the implementation object. The MethodImplementation will be provided with plenty of support methods for handling Connection objects correctly and so on, making development of new method implementations much easier.

Why make this change?

This change would allow for easy development of new Annotation instructions, for example: @BatchUpdate or @Call (both requested features). The new instructions could be mixed in with existing annotations such as @Select and @Update without any additional code.

Any thoughts on this? Comments are welcome!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: