{-------------------------------------------------------------------------------------
-
- No database connectivity
- Programmer: Leonidas Fegaras
- Email: fegaras@cse.uta.edu
- Web: http://lambda.uta.edu/- Creation: 08/14/08, last update: 01/14/09
-
- Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved.
- This material is provided as is, with absolutely no warranty expressed or implied.
- Any use is at your own risk. Permission is hereby granted to use or copy this program
- for any purpose, provided the above notices are retained on all copies.
-
--------------------------------------------------------------------------------------}moduleText.XML.HXQ.OptionalDBwhereimportText.XML.HXQ.XTreeimportText.XML.HXQ.ParserimportLanguage.Haskell.THtypeStatement=StringtypeTable=StringdataConnection=ConnectionStringnoDBerror=error"This version of HXQ does not provide database connectivity"publishXmlDoc::FilePath->String->Bool->AstpublishXmlDocfilepathname_=noDBerrorexecuteSQL::Statement->XSeq->IOXSeqexecuteSQLstmtargs=noDBerrorprepareSQL::Connection->String->IOStatementprepareSQLdbsql=noDBerror-- | Connect to a relational databaseconnect::String-- ^ database name->IOConnectionconnectdbname=noDBerror-- | Disconnect from the relational databasedisconnect::Connection-- ^ database connection->IO()disconnectdb=noDBerror-- | commit the updates to the databasecommit::Connection-- ^ database connection->IO()commitdb=noDBerror-- | rollback the updates from the databaserollback::Connection-- ^ database connection->IO()rollbackdb=noDBerror-- | True if there is a relational schema stored in the database under the given nameisSchema::Connection-- ^ database connection->String-- ^ schema name->IOBoolisSchemadbname=noDBerror-- | Print the relational schema stored in the database under the given nameprintSchema::Connection-- ^ database connection->String-- ^ schema name->IO()printSchemadbname=noDBerror-- | Create a schema for an XML document into the database under the given name.-- The excluded tags are HTML tags to be ignoredgenSchema::Connection-- ^ database connection->FilePath-- ^ XML document pathname->String-- ^ schema name->[String]-- ^ excluded tags->IOTablegenSchemadbfilenametags=noDBerror-- | Store an XML document into the database under the given name.shred::Connection-- ^ database connection->FilePath-- ^ XML document pathname->String-- ^ schema name->IO()shreddbfilename=noDBerror-- | Store an XML document into the database under the given name. Generates Haskell code. It's 3 times faster than shred.shredC::String-- ^ database name->FilePath-- ^ XML document pathname->String-- ^ schema name->QExpshredCdbfilename=noDBerror-- | Create a secondary index on tagname for the shredded document under the given name..createIndex::Connection-- ^ database connection->String-- ^ schema name->String-- ^ the tag name of the elements to be indexed->IO()createIndexdbnametagname=noDBerrorinsertDB::Connection->XSeq->XSeq->IOXSeqinsertDBdbfrominto=noDBerrordeleteDB::Connection->XSeq->IOXSeqdeleteDBdbfrom=noDBerrorreplaceDB::Connection->XSeq->XSeq->IOXSeqreplaceDBdbdestwith=noDBerror