<commit_before>-----------------------------------------------------------
-- <NAME> (c) 1999, <EMAIL>
--
-- HaskellDB is the main module that a user should 
-- import. Beside this module, a user should import a
-- particular database binding (ie. Ado) and database
-- definitions (ie. Pubs).
-----------------------------------------------------------
module HaskellDB 
	( Rel, Attr, Expr, Table, Query	-- abstract
	
	, (!)	
	, restrict, table
	, union, intersect, divide, minus
		
	, (.==.) , (.<>.), (.<.), (.<=.), (.>.), (.>=.)
	, (.&&.) , (.||.)
	, (.*.) , (./.), (.%.), (.+.), (.-.), (.++.)
	, _not, like, cat
	, isNull, notNull
	, constant
	
	, count, _sum, _max, _min, avg
	, stddev, stddevP, variance, varianceP
	
	, asc, desc, order
	, top, topPercent
	
	, Row, Database				-- abstract
	, (!.)
	, query, lazyQuery, strictQuery
	, insert, delete, update, insertNew
	
	, showQ, showOpt, showSql
	
	) where

import PrimQuery (ppPrimQuery)
import Sql       (toSql, ppSql)
import Optimize  (optimize)
import Query
import Database

-----------------------------------------------------------
-- Show Queries, both as PrimQuery, Optimized PrimQuery and SQL
-----------------------------------------------------------
instance Show (Query (Rel r)) where
  showsPrec d query     = shows (showSql query)
  
showQ       = ppPrimQuery . runQuery
showOpt     = ppPrimQuery . optimize . runQuery
showSql     = ppSql . toSql . optimize . runQuery <commit_msg>Added export of (#)<commit_after>-----------------------------------------------------------
-- <NAME> (c) 1999, <EMAIL>
--
-- HaskellDB is the main module that a user should 
-- import. Beside this module, a user should import a
-- particular database binding (ie. Ado) and database
-- definitions (ie. Pubs).
-----------------------------------------------------------
module HaskellDB 
	( Rel, Attr, Expr, Table, Query	-- abstract
	
	, ( # )


	, (!)	
	, restrict, table
	, union, intersect, divide, minus
		
	, (.==.) , (.<>.), (.<.), (.<=.), (.>.), (.>=.)
	, (.&&.) , (.||.)
	, (.*.) , (./.), (.%.), (.+.), (.-.), (.++.)
	, _not, like, cat
	, isNull, notNull
	, constant
	
	, count, _sum, _max, _min, avg
	, stddev, stddevP, variance, varianceP
	
	, asc, desc, order
	, top, topPercent
	
	, Row, Database				-- abstract
	, (!.)
	, query, lazyQuery, strictQuery
	, insert, delete, update, insertNew
	
	, showQ, showOpt, showSql
	
	) where

import PrimQuery (ppPrimQuery)
import Sql       (toSql, ppSql)
import Optimize  (optimize)
import Query
import Database
import HDBRecUtils

-----------------------------------------------------------
-- Show Queries, both as PrimQuery, Optimized PrimQuery and SQL
-----------------------------------------------------------
instance Show (Query (Rel r)) where
  showsPrec d query     = shows (showSql query)
  
showQ       = ppPrimQuery . runQuery
showOpt     = ppPrimQuery . optimize . runQuery
showSql     = ppSql . toSql . optimize . runQuery 
{'fraction_non_alphanumeric': 0.30264945652173914, 'fraction_numerical': 0.002717391304347826, 'mean_word_length': 1.6131322094055014, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1650563', 'n_tokens_mistral': 931, 'n_tokens_neox': 848, 'n_words': 261}