Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defimpl database
- "Base database interface. Tries to be as abstract as possible while still providing all essential functionality."
- (db-connect (dbname &key (host (config-tree :database :host))
- (port (config-tree :database :port))
- (user (config-tree :database :user))
- (pass (config-tree :database :pass)))
- "Connects to the database given the information in the arguments.")
- (db-disconnect () "Disconnects the database")
- (db-connected-p () "Returns T if the database is connected, otherwise NIL.")
- (db-collections () "Returns a list of all existing collections.")
- (db-create ((collection collection) &key indices) "Create a new collection with an optional list of indexed fields.")
- (db-select ((collection collection) query) "Retrieve data from the collection. Query is a plist containing field specifiers.")
- (db-insert ((collection collection) data) "Insert the data into the collection. Data is a list of plists.")
- (db-remove ((collection collection) query) "Delete data from the collection. Query is a plist containing field specifiers.")
- (db-update ((collection collection) query data) "Update data in the collection. Query is a plist containing field specifiers and data is a list of plists.")
- (db-apropos ((collection collection)) "Returns a list of all available fields and their type or NIL if any field is possible."))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement