metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Saputra <henry.sapu...@gmail.com>
Subject Re: Minor improvements to fluent Query builder API
Date Sat, 20 Jul 2013 18:25:01 GMT
Lets just use master branch for committing changes.

Just merge the change to your master local branch and then push to master
origin:

git chekcout master
git merge <local branch name>
git pull --rebase
git push origin master

You can do the same for the branch where you change the package name to
org.metamodel.apache


- Henry


On Sat, Jul 20, 2013 at 12:37 AM, Kasper Sørensen <
i.am.kasper.sorensen@gmail.com> wrote:

> I did attach a .patch file ... Created in eclipse, and to be honest I did
> have trouble then applying it to a clean project again. I think the eclipse
> patch was not a real git patch but some other patch format :-/
>
> So now I have a local branch instead. Should I make it a remote branch
> also, or what's the preferred approach? (sorry for the Git-newbieness)
>
> Kasper
>
>
> 2013/7/19 Henry Saputra <henry.saputra@gmail.com>
>
> > HI Kasper,
> >
> > Was there an attachment with the reply or did you miss copying the git
> > diff?
> >
> > - Henry
> >
> >
> > On Thu, Jul 18, 2013 at 1:33 AM, Kasper Sørensen <
> > i.am.kasper.sorensen@gmail.com> wrote:
> >
> > > Here's the patch. It's fairly trivial IMO, but as the unittest (and
> > sample
> > > in the above email) shows, it reduces LoC quite a lot if you want to do
> > > this sort of join and you know the table/column names.
> > >
> > >
> > > 2013/7/18 Henry Saputra <henry.saputra@gmail.com>
> > >
> > >> Hi Kasper,
> > >>
> > >> You could just attach proposed patch here and review through list for
> a
> > >> while. I have pinged INFRA about the JIRA component.
> > >>
> > >> I will also try to get reviewboard (https://reviews.apache.org) for
> > >> MetaModel
> > >>
> > >> - Henry
> > >>
> > >>
> > >> On Thu, Jul 18, 2013 at 1:20 AM, Kasper Sørensen <
> > >> i.am.kasper.sorensen@gmail.com> wrote:
> > >>
> > >> > Hi guys,
> > >> >
> > >> > I have a few improvements to the fluent Query builder API, that I
> > would
> > >> > like to commit.
> > >> >
> > >> > Basically the fluent Query builder API supports building joins, but
> > >> only if
> > >> > you've already traversed Table and Column objects from the schema
> > model.
> > >> > What I would like to improve is to add String-based builder methods
> so
> > >> that
> > >> > instead of something quite verbose like this...
> > >> >
> > >> > Table table1 = dataContext.getTableByName("table1");
> > >> > Column col1 = table1.getColumnByName("col1");
> > >> >
> > >> > Table table2 = dataContext.getTableByName("table2");
> > >> > Column col2 = table2.getColumnByName("col2");
> > >> >
> > >> > DataSet ds = dataContext.query()
> > >> >     .from(table1).innerJoin(table2).on(col1, col2).execute();
> > >> >
> > >> >
> > >> > One could alternatively just use the table/column names directly in
> > the
> > >> > builder API, like this:
> > >> >
> > >> > DataSet ds = dataContext.query()
> > >> >     .from("table1").innerJoin("table2").on("col1",
> "col2").execute();
> > >> >
> > >> >
> > >> > Since we dont have JIRA up and running yet, I didn't find a proper
> way
> > >> to
> > >> > add this as an improvement anywhere. Should I just commit anyway,
or
> > >> hold
> > >> > my commit until JIRA is up? Or are there any objections to the
> > >> improvement?
> > >> >
> > >>
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message