make metadata storage pluggable

Let's adjust the tutorial to use booleans too, all databases we support
works with TRUE/FALSE as far as I know.

On Wed, Oct 29, 2014 at 12:42 PM, jisookim0513 <notifications@github.com>
wrote:

> In server/src/main/java/io/druid/db/SQLMetadataConnector.java:
>
> > +              handle.createStatement(String.format("CREATE INDEX %1$s ON %2$s(%3$s)", indexName, tableName, columnName)).execute();
> > +            }
> > +            return null;
> > +          }
> > +        }
> > +    );
> > +  }
> > +
> > +  public void createSegmentTable(final IDBI dbi, final String tableName)
> > +  {
> > +    createTable(
> > +        dbi,
> > +        tableName,
> > +        String.format(
> > +            "CREATE table %s (id VARCHAR(255) NOT NULL, dataSource VARCHAR(255) NOT NULL, created_date VARCHAR(255) NOT NULL, "
> > +            + "start VARCHAR(255) NOT NULL, \"end\" VARCHAR(255) NOT NULL, partitioned SMALLINT NOT NULL, version VARCHAR(255) NOT NULL, "
>
> When I created sql statements for derby, i changed the type to SMALLINT in
> order to make it work with the tutorial on the druid website. The tutorial
> uses 1 or 0 to indicate boolean but derby doesn't accept it as a boolean
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/metamx/druid/pull/758/files#r19566275>.
>