Return a dictionnary of current tables
480395
def dumps(self):
        """"""
        return {table_name: getattr(self, table_name).dumps() for table_name in self.TABLES}
11164
def get_table(self, tablename):
        
        temp = filter(lambda x: x.name == tablename, self.tables)
        if temp == list():
            raise Exception("No such table")
        return temp[0]
754588
def get_attrdict(self) -> OrderedNamespace:
        
        # noinspection PyUnresolvedReferences
        columns = self.__table__.columns.keys()
        values = (getattr(self, x) for x in columns)
        zipped = zip(columns, values)
        return OrderedNamespace(zipped)
261815
def table(self, datatype=None):
        ""
        if config.future_deprecations:
            self.param.warning(
                "The table method is deprecated and should no "
                "longer be used. Instead cast the %s to a "
                "a Table directly." % type(self).__name__)

        if datatype and not isinstance(datatype, list):
            datatype = [datatype]
        from ..element import Table
        return Table(self, **(dict(datatype=datatype) if datatype else {}))
1065628
def get_globals(self):
        """"""
        if self.shell:
            globals_ = dict(_initial_globals)
        else:
            globals_ = dict(self.current_frame.f_globals)
        globals_['_'] = self.db.last_obj
        if cut is not None:
            globals_.setdefault('cut', cut)
        # For meta debuging purpose
        globals_['___wdb'] = self.db
        # Hack for function scope eval
        globals_.update(self.current_locals)
        for var, val in self.db.extra_vars.items():
            globals_[var] = val
        self.db.extra_items = {}
        return globals_
947974
def get_knobs_current_as_table(cls):
        

        knob_list = [
            {
                'Knob': name,
                'Description': cls.get_registered_knob(name).description,
                'Value': cls.get_registered_knob(name)(),
            } for name in sorted(cls._register.keys())
        ]
        return tabulate.tabulate(knob_list, headers='keys', tablefmt='fancy_grid')
381983
def dict(self):
        
        SKIP_KEYS = ('_source_table', '_dest_table', 'd_vid', 't_vid', 'st_id',
                     'dataset', 'hash', 'process_records')
        return OrderedDict([(k, getattr(self, k)) for k in self.properties if k not in SKIP_KEYS])
1292784
def find_all(self, cls):
        """"""
        final_results = []
        table = self.get_class_table(cls)
        for db_result in table.scan():
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
421519
def tables(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_tables(options)
        resp.each_page do |page|
          batch = []
          page.data.table_names.each do |t|
            batch << Table.new(
              name: t,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Table::Collection.new(batches)
    end
1229263
def current_state(self):
        """"""
        state = {}
        for s in self._state:
            state[s] = getattr(self, s)
        return state
335816
def to_dict(self):
        
        result_dict = {}
        for column in self.__table__.columns.keys():  # pylint: disable=no-member
            value = result_dict[column] = getattr(self, column, None)
            if isinstance(value, Decimal):
                result_dict[column] = float(result_dict[column])
            elif isinstance(value, datetime.datetime):
                result_dict[column] = value.isoformat()
        return result_dict
550950
def tablesAndViews(self):
      """"""
      result = self.execute(
        u'SELECT name,type FROM sqlite_master WHERE type in ("table", "view")',
        commit=False)
      return ((row['name'],row['type']) for row in result)
1054086
def tables(self):
        
        cursor = self.connection.cursor()
        cursor.execute("show tables in %s" % self.db)
        self._tables = [t.Table(r[0], con=self.connection, db=self.db) for r in cursor.fetchall()]
        return self._tables
132914
def _as_dict(self):
        
        values = self._dynamic_columns or {}
        for name, col in self._columns.items():
            values[name] = col.to_database(getattr(self, name, None))
        return values
28869
def get_buffer(self):
        """"""
        buffer = []
        for table in self.__tables: 
            buffer.extend(table.get_buffer())
        return buffer
1253411
def current(self, fields=None):
        """"""
        if fields is None:
            fields = self.fields

        return dict((f, self.get_field_value(f)) for f in fields)
118326
def _tables(self) -> List[Tuple[str, str]]:
        
        return [(k.rsplit('.', 1)[1] if '.' in k else k, k) for k in self._ont_tables.keys()]