<commit_before>var pgEscape = require('pg-escape')
var debug = require('debug')('pg-validate')

module.exports = pgSchema
module.exports.createQuery = createQuery
module.exports.createSchemaObject = createSchemaObject

function pgSchema(connection, tableName, schemaName, databaseName, callback) {

	if (!connection)
		throw new Error('must provide a connection object')

	if (!tableName)
		throw new Error('must provide a table to describe')

	if (typeof(schemaName) === 'function')
		callback = schemaName

	if (typeof(databaseName) === 'function')
		callback = databaseName<commit_msg>fix problem with argument order<commit_after>var pgEscape = require('pg-escape')
var debug = require('debug')('pg-validate')

module.exports = pgSchema
module.exports.createQuery = createQuery
module.exports.createSchemaObject = createSchemaObject

function pgSchema(connection, tableName, schemaName, databaseName, callback) {

	if (!connection)
		throw new Error('must provide a connection object')

	if (!tableName)
		throw new Error('must provide a table to describe')

	if (typeof(schemaName) === 'function') {
		callback = schemaName
		schemaName = undefined
		databaseName = undefined
	}

	if (typeof(databaseName) === 'function') {
		callback = databaseName
		databaseName = undefined
	}
{'fraction_non_alphanumeric': 0.11145752143413874, 'fraction_numerical': 0.0, 'mean_word_length': 5.829787234042553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3445201', 'n_tokens_mistral': 366, 'n_tokens_neox': 346, 'n_words': 103}