Skip to content

Commit

Permalink
https://github.com/chucknorris/roundhouse/pull/59
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Sep 7, 2012
1 parent 644020f commit 4740243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions product/roundhouse.databases.oracle/OracleDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public override long insert_version_and_get_version_id(string repository_path, s
run_sql(insert_version_script(), ConnectionType.Default, insert_parameters);

var select_parameters = new List<IParameter<IDbDataParameter>> { create_parameter("repository_path", DbType.AnsiString, repository_path, 255) };
return Convert.ToInt64((decimal)run_sql_scalar(get_version_id_script(), ConnectionType.Default, select_parameters));
return Convert.ToInt64(run_sql_scalar(get_version_id_script(), ConnectionType.Default, select_parameters));
}

public override void run_sql(string sql_to_run, ConnectionType connection_type)
Expand Down Expand Up @@ -172,7 +172,7 @@ private IParameter<IDbDataParameter> create_parameter(string name, DbType type,
parameter.Direction = ParameterDirection.Input;
parameter.ParameterName = name;
parameter.DbType = type;
parameter.Value = value;
parameter.Value = value ?? DBNull.Value;
if (size != null)
{
parameter.Size = size.Value;
Expand Down Expand Up @@ -210,7 +210,7 @@ public string get_version_id_script()
SELECT id
FROM (SELECT * FROM {0}_{1}
WHERE
repository_path = :repository_path
NVL(repository_path, '') = NVL(:repository_path, '')
ORDER BY entry_date DESC)
WHERE ROWNUM < 2
",
Expand Down

0 comments on commit 4740243

Please sign in to comment.