def _create(self, tree):
        """ Run a SELECT statement """
        tablename = tree.table
        indexes = []
        global_indexes = []
        hash_key = None
        range_key = None
        attrs = {}
        for declaration in tree.attrs:
            name, type_ = declaration[:2]
            if len(declaration) > 2:
                index = declaration[2]
            else:
                index = None
            if index is not None:
                if index[0] == "HASH":
                    field = hash_key = DynamoKey(name, data_type=TYPES[type_])
                elif index[0] == "RANGE":
                    field = range_key = DynamoKey(name, data_type=TYPES[type_])
                else:
                    index_type = index[0]
                    kwargs = {}
                    if index_type[0] in ("ALL", "INDEX"):
                        factory = LocalIndex.all
                    elif index_type[0] == "KEYS":
                        factory = LocalIndex.keys
                    elif index_type[0] == "INCLUDE":
                        factory = LocalIndex.include
                        kwargs["includes"] = [resolve(v) for v in index.include_vars]
                    index_name = resolve(index[1])
                    field = DynamoKey(name, data_type=TYPES[type_])
                    idx = factory(index_name, field, **kwargs)
                    indexes.append(idx)
            else:
                field = DynamoKey(name, data_type=TYPES[type_])
            attrs[field.name] = field

        for gindex in tree.global_indexes:
            global_indexes.append(self._parse_global_index(gindex, attrs))

        throughput = None
        if tree.throughput:
            throughput = Throughput(*map(resolve, tree.throughput))

        try:
            ret = self.connection.create_table(
                tablename,
                hash_key,
                range_key,
                indexes=indexes,
                global_indexes=global_indexes,
                throughput=throughput,
            )
        except DynamoDBError as e:
            if e.kwargs["Code"] == "ResourceInUseException" or tree.not_exists:
                return False
            raise
        return True
Run a SELECT statement