moved all SQL queries into single Database module

You can get a nicer error message by doing it in the constructor.

On Fri, Dec 12, 2014 at 4:33 PM, Tavi Nathanson <notifications@github.com>
wrote:
>
> In pyensembl/gene.py
> <https://github.com/hammerlab/pyensembl/pull/16#discussion-diff-21774832>:
>
> > -        if not result:
> > +        columns = [
> > +            'gene_name',
> > +            'seqname',
> > +            'start',
> > +            'end',
> > +            'strand',
> > +            'gene_biotype'
> > +        ]
> > +        results = self.db.query(
> > +            columns,
> > +            filter_column='gene_id',
> > +            filter_value=gene_id,
> > +            feature='gene')
> > +
> > +        if len(results) == 0:
>
> Doesn't run_sql_query already have the same == 0 logic? I think it might
> be cleaner to keep the too-few and too-many logic there. Can you just pass
> args through via query(...)?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hammerlab/pyensembl/pull/16/files#r21774832>.
>