<commit_before>// Copyright 2004-2006 Castle Project - http://www.castleproject.org/
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Castle.VSNetIntegration.CastleWizards
{
	using System;

	public class NHUtil
	{
		private NHUtil() { }
		
		public static Pair[] GetSampleConnectionStrings()
		{
			return new Pair[] {
				new Pair("Oracle", "Data Source=;User ID=;Password=;"), 
				new Pair("MS SQLServer", "Server=(local);Initial Catalog=yourdatabase;Integrated Security=SSPI"), 
				new Pair("MySql", "Database=test;Data Source=IP;User Id=;Password="),
				new Pair("Firebird", "Server=localhost;Database=c:\file.fdb;User=;password=;ServerType=1;Pooling=false"),
				new Pair("PostgreSQL", "Server=localhost;initial catalog=dbname;User ID=;Password=;"),
				new Pair("SQLite", "Data Source=database.name;Version=3"),
			};
		}

		public static Pair[] GetGeneralSettings()
		{
			return new Pair[] {
				new Pair("hibernate.cache.use_query_cache", "true"), 
				new Pair("hibernate.connection.isolation", "ReadCommitted"),
				new Pair("hibernate.show_sql", "false"),
			};
		}

		public static Pair[] GetSettingsFor(String database)
		{
			if (database == "Oracle")
			{
				return new Pair[] {
					new Pair("hibernate.dialect", "NHibernate.Dialect.OracleDialect"), 
					new Pair("hibernate.connection.driver_class", "NHibernate.Driver.OracleClientDriver")
				};
			}
			else if (database == "MS SQLServer")
			{
				return new Pair[] {
					new Pair("hibernate.dialect", "NHibernate.Dialect.MsSql2000Dialect"), 
					new Pair("hibernate.connection.driver_class", "NHibernate.Driver.SqlClientDriver")
					//new Pair("hibernate.query.substitutions", "true 1, false 0, yes 'Y', no 'N'")
				};
			}
			else if (database == "MySql")<commit_msg>Added missing entry<commit_after>// Copyright 2004-2006 Castle Project - http://www.castleproject.org/
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Castle.VSNetIntegration.CastleWizards
{
	using System;

	public class NHUtil
	{
		private NHUtil() { }
		
		public static Pair[] GetSampleConnectionStrings()
		{
			return new Pair[] {
				new Pair("Oracle", "Data Source=;User ID=;Password=;"), 
				new Pair("MS SQLServer", "Server=(local);Initial Catalog=yourdatabase;Integrated Security=SSPI"), 
				new Pair("MySql", "Database=test;Data Source=IP;User Id=;Password="),
				new Pair("Firebird", "Server=localhost;Database=c:\file.fdb;User=;password=;ServerType=1;Pooling=false"),
				new Pair("PostgreSQL", "Server=localhost;initial catalog=dbname;User ID=;Password=;"),
				new Pair("SQLite", "Data Source=database.name;Version=3"),
			};
		}

		public static Pair[] GetGeneralSettings()
		{
			return new Pair[] {
				new Pair("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider"),
				new Pair("hibernate.command_timeout", "5000"),
				new Pair("hibernate.cache.use_query_cache", "true"), 
				new Pair("hibernate.connection.isolation", "ReadCommitted"),
				new Pair("hibernate.show_sql", "false"),
			};
		}

		public static Pair[] GetSettingsFor(String database)
		{
			if (database == "Oracle")
			{
				return new Pair[] {
					new Pair("hibernate.dialect", "NHibernate.Dialect.OracleDialect"), 
					new Pair("hibernate.connection.driver_class", "NHibernate.Driver.OracleClientDriver")
				};
			}
			else if (database == "MS SQLServer")
			{
				return new Pair[] {
					new Pair("hibernate.dialect", "NHibernate.Dialect.MsSql2000Dialect"), 
					new Pair("hibernate.connection.driver_class", "NHibernate.Driver.SqlClientDriver")
				};
			}
			else if (database == "MySql")
{'fraction_non_alphanumeric': 0.13678734012573163, 'fraction_numerical': 0.009104704097116844, 'mean_word_length': 4.132369299221357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3109345', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1347, 'n_words': 375}