indexing
     status: "See notice at end of class"
     date: "$Date$"
     revision: "$Revision$"
     product: "EiffelStore"
     database: "All bases"

deferred class interface
     DB_EXPRESSION

feature -- Status report

     is_mapped (key: STRING): BOOLEAN
                 -- Is key mapped to an Eiffel entity?
                 -- (from STRING_HDL)
           require -- from STRING_HDL
                 keys_exists: key /= void

     last_query: STRING
                 -- Last SQL statement used

     mapped_value (key: STRING): ANY
                 -- Value mapped with key
                 -- (from STRING_HDL)
           require -- from STRING_HDL
                 key_exists: key /= void
                 key_mapped: is_mapped (key)
           ensure -- from STRING_HDL
                 result_exists: Result /= void
     
feature -- Status setting

     clear_all
                 -- Remove all mapped keys.
                 -- (from STRING_HDL)

     set_map_name (n: ANY; key: STRING)
                 -- Store item n with key key.
                 -- n can be Void.
                 -- (from STRING_HDL)
           require -- from STRING_HDL
                 key_exists: key /= void
                 not_key_in_table: not is_mapped (key)
           ensure -- from STRING_HDL
                 ht.count = old ht.count + 1

     set_query (query: STRING)
                 -- Set last_query with query.
           require
                 query_not_void: query /= void
           ensure
                 last_query_changed: last_query = query

     unset_map_name (key: STRING)
                 -- Remove item associated with key key.
                 -- (from STRING_HDL)
           require -- from STRING_HDL
                 key_exists: key /= void
                 item_exists: is_mapped (key)
           ensure -- from STRING_HDL
                 ht.count = old ht.count - 1
     
feature -- Basic operations

     execute_query
                 -- Execute last_query.
           require
                 last_query_not_void: last_query /= void
     
invariant

           -- from ANY
     reflexive_equality: standard_is_equal (Current)
     reflexive_conformance: conforms_to (Current)

end -- class DB_EXPRESSION