rename_table (KirbyBase)

    # File lib/kirbybase.rb, line 698
        def rename_table(old_tablename, new_tablename)
            raise "Cannot rename table running in client mode!" if client?
            raise "Table does not exist!" unless table_exists?(old_tablename)
            raise(ArgumentError, 'Existing table name must be a symbol!') \
             unless old_tablename.is_a?(Symbol)
            raise(ArgumentError, 'New table name must be a symbol!') unless \
             new_tablename.is_a?(Symbol)
            raise "Table already exists!" if table_exists?(new_tablename)

            @table_hash.delete(old_tablename)
            @engine.rename_table(old_tablename, new_tablename)
            get_table(new_tablename)
        end

        #-----------------------------------------------------------------------

        # drop_table

        #-----------------------------------------------------------------------

        #++

        # Delete a table.

        #

        # *tablename*:: Symbol of table name.

        #

        def drop_table(tablename)
            raise(ArgumentError, 'Table name must be a symbol!') unless \
             tablename.is_a?(Symbol)
            raise "Table does not exist!" unless table_exists?(tablename)
            @table_hash.delete(tablename)

            return @engine.delete_table(tablename)
        end

        #-----------------------------------------------------------------------

        # table_exists?

        #-----------------------------------------------------------------------

        #++

        # Return true if table exists.

        #

        # *tablename*:: Symbol of table name.

        #

        def table_exists?(tablename)
            raise(ArgumentError, 'Table name must be a symbol!') unless \
             tablename.is_a?(Symbol)

            return @engine.table_exists?(tablename)
        end

    end