2011-06-23 12:47:48 +00:00
|
|
|
|
using NHibernate;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
using NHibernate.SqlCommand;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.SqlDAO
|
|
|
|
|
{
|
|
|
|
|
public static class QueryStore
|
|
|
|
|
{
|
|
|
|
|
private static string query;
|
|
|
|
|
public static string Query
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return query;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
query = value;
|
|
|
|
|
Debug.Write(query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class NHSQLInterceptor : EmptyInterceptor, IInterceptor
|
|
|
|
|
{
|
2011-02-04 19:30:55 +00:00
|
|
|
|
SqlString IInterceptor.OnPrepareStatement(SqlString sql)
|
2011-01-30 07:14:05 +00:00
|
|
|
|
{
|
|
|
|
|
QueryStore.Query = sql.ToString();
|
|
|
|
|
return sql;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|