<commit_before>//
//  SQL.swift
//  SQLiteStORM
//
//  Created by <NAME> on 2016-10-07.
//
//

import StORM
import SQLite

extension SQLiteStORM {

	@discardableResult
	public func sqlExec(_ statement: String) throws {
		do {
			try execStatement(statement)
		} catch {
			self.error = StORMError.error(error as! String)
			throw error
		}
	}

	@discardableResult
	public func sql(_ statement: String, params: [String]) throws -> [SQLiteStmt] {
		do {
			return try exec(statement, params: params)
		} catch {
			self.error = StORMError.error(error as! String)
			throw error
		}
	}

	@discardableResult
	public func sqlAny(_ statement: String, params: [String]) throws -> Any {
		do {
			return try execReturnID(statement, params: params)
		} catch {
			self.error = StORMError.error(error as! String)
			throw error
		}
	}

	@discardableResult
	public func sqlRows(_ statement: String, params: [String]) throws -> [StORMRow] {
		do {
			return try execRows(statement, params: params)
		} catch {
			self.error = StORMError.error(error as! String)
			throw error
		}
	}
	
}<commit_msg>protecting string conversions<commit_after>//
//  SQL.swift
//  SQLiteStORM
//
//  Created by <NAME> on 2016-10-07.
//
//

import StORM
import SQLite

extension SQLiteStORM {

	@discardableResult
	public func sqlExec(_ statement: String) throws {
		do {
			try execStatement(statement)
		} catch {
			self.error = StORMError.error(String(describing: error))
			throw error
		}
	}

	@discardableResult
	public func sql(_ statement: String, params: [String]) throws -> [SQLiteStmt] {
		do {
			return try exec(statement, params: params)
		} catch {
			self.error = StORMError.error(String(describing: error))
			throw error
		}
	}

	@discardableResult
	public func sqlAny(_ statement: String, params: [String]) throws -> Any {
		do {
			return try execReturnID(statement, params: params)
		} catch {
			self.error = StORMError.error(String(describing: error))
			throw error
		}
	}

	@discardableResult
	public func sqlRows(_ statement: String, params: [String]) throws -> [StORMRow] {
		do {
			return try execRows(statement, params: params)
		} catch {
			self.error = StORMError.error(String(describing: error))
			throw error
		}
	}
	
}
{'fraction_non_alphanumeric': 0.11600719424460432, 'fraction_numerical': 0.007194244604316547, 'mean_word_length': 3.458917835671343, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4465379', 'n_tokens_mistral': 838, 'n_tokens_neox': 738, 'n_words': 198}