forked from sebmarkbage/calyptus.lob
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed blob driver to work correctly with Oracle NHibernate dialects.
- Loading branch information
1 parent
bcfbbb1
commit c364184
Showing
4 changed files
with
137 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.1 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
[assembly: AssemblyCompany("http://www.devdefined.com/")] | ||
[assembly: AssemblyCopyright("(C) 20011-2012 DevDefined Ltd")] | ||
[assembly: AssemblyTrademark("Lob for .Net")] | ||
[assembly: ComVisible(false)] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: AssemblyInformationalVersion("1.0.0")] | ||
|
||
|
||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.225 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
[assembly: AssemblyCompany("http://www.devdefined.com/")] | ||
[assembly: AssemblyCopyright("(C) 20011-2012 DevDefined Ltd")] | ||
[assembly: AssemblyTrademark("Lob for .Net")] | ||
[assembly: ComVisible(false)] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: AssemblyInformationalVersion("1.0.0")] | ||
|
||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 102 additions & 97 deletions
199
Src/Lob.NHibernate/Wrappers/ExternalBlobDbCommandWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,103 @@ | ||
using System.Data; | ||
using System.Data.Common; | ||
|
||
namespace Lob.NHibernate.Wrappers | ||
{ | ||
public class ExternalBlobDbCommandWrapper : DbCommand | ||
{ | ||
readonly DbCommand _cmd; | ||
DbConnection _conn; | ||
|
||
public ExternalBlobDbCommandWrapper(DbConnection conn, DbCommand cmd) | ||
{ | ||
_cmd = cmd; | ||
_conn = conn; | ||
} | ||
|
||
public override string CommandText | ||
{ | ||
get { return _cmd.CommandText; } | ||
set { _cmd.CommandText = value; } | ||
} | ||
|
||
public override int CommandTimeout | ||
{ | ||
get { return _cmd.CommandTimeout; } | ||
set { _cmd.CommandTimeout = value; } | ||
} | ||
|
||
public override CommandType CommandType | ||
{ | ||
get { return _cmd.CommandType; } | ||
set { _cmd.CommandType = value; } | ||
} | ||
|
||
protected override DbConnection DbConnection | ||
{ | ||
get { return _conn; } | ||
set | ||
{ | ||
_conn = value; | ||
_cmd.Connection = ((ExternalBlobDbConnectionWrapper) value)._db as DbConnection; | ||
} | ||
} | ||
|
||
protected override DbParameterCollection DbParameterCollection | ||
{ | ||
get { return _cmd.Parameters; } | ||
} | ||
|
||
protected override DbTransaction DbTransaction | ||
{ | ||
get { return _cmd.Transaction; } | ||
set { _cmd.Transaction = value; } | ||
} | ||
|
||
public override bool DesignTimeVisible | ||
{ | ||
get { return false; } | ||
set { } | ||
} | ||
|
||
public override UpdateRowSource UpdatedRowSource | ||
{ | ||
get { return _cmd.UpdatedRowSource; } | ||
set { _cmd.UpdatedRowSource = value; } | ||
} | ||
|
||
public override void Cancel() | ||
{ | ||
_cmd.Cancel(); | ||
} | ||
|
||
protected override DbParameter CreateDbParameter() | ||
{ | ||
return _cmd.CreateParameter(); | ||
} | ||
|
||
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) | ||
{ | ||
return _cmd.ExecuteReader(behavior); | ||
} | ||
|
||
public override int ExecuteNonQuery() | ||
{ | ||
return _cmd.ExecuteNonQuery(); | ||
} | ||
|
||
public override object ExecuteScalar() | ||
{ | ||
return _cmd.ExecuteScalar(); | ||
} | ||
|
||
public override void Prepare() | ||
{ | ||
_cmd.Prepare(); | ||
} | ||
} | ||
using System.Data; | ||
using System.Data.Common; | ||
|
||
namespace Lob.NHibernate.Wrappers | ||
{ | ||
public class ExternalBlobDbCommandWrapper : DbCommand | ||
{ | ||
readonly DbCommand _cmd; | ||
DbConnection _conn; | ||
|
||
public ExternalBlobDbCommandWrapper(DbConnection conn, DbCommand cmd) | ||
{ | ||
_cmd = cmd; | ||
_conn = conn; | ||
} | ||
|
||
public virtual DbCommand UnderlyingCommand | ||
{ | ||
get { return _cmd; } | ||
} | ||
|
||
public override string CommandText | ||
{ | ||
get { return _cmd.CommandText; } | ||
set { _cmd.CommandText = value; } | ||
} | ||
|
||
public override int CommandTimeout | ||
{ | ||
get { return _cmd.CommandTimeout; } | ||
set { _cmd.CommandTimeout = value; } | ||
} | ||
|
||
public override CommandType CommandType | ||
{ | ||
get { return _cmd.CommandType; } | ||
set { _cmd.CommandType = value; } | ||
} | ||
|
||
protected override DbConnection DbConnection | ||
{ | ||
get { return _conn; } | ||
set | ||
{ | ||
_conn = value; | ||
_cmd.Connection = ((ExternalBlobDbConnectionWrapper) value)._db as DbConnection; | ||
} | ||
} | ||
|
||
protected override DbParameterCollection DbParameterCollection | ||
{ | ||
get { return _cmd.Parameters; } | ||
} | ||
|
||
protected override DbTransaction DbTransaction | ||
{ | ||
get { return _cmd.Transaction; } | ||
set { _cmd.Transaction = value; } | ||
} | ||
|
||
public override bool DesignTimeVisible | ||
{ | ||
get { return false; } | ||
set { } | ||
} | ||
|
||
public override UpdateRowSource UpdatedRowSource | ||
{ | ||
get { return _cmd.UpdatedRowSource; } | ||
set { _cmd.UpdatedRowSource = value; } | ||
} | ||
|
||
public override void Cancel() | ||
{ | ||
_cmd.Cancel(); | ||
} | ||
|
||
protected override DbParameter CreateDbParameter() | ||
{ | ||
return _cmd.CreateParameter(); | ||
} | ||
|
||
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) | ||
{ | ||
return _cmd.ExecuteReader(behavior); | ||
} | ||
|
||
public override int ExecuteNonQuery() | ||
{ | ||
return _cmd.ExecuteNonQuery(); | ||
} | ||
|
||
public override object ExecuteScalar() | ||
{ | ||
return _cmd.ExecuteScalar(); | ||
} | ||
|
||
public override void Prepare() | ||
{ | ||
_cmd.Prepare(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters