Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for TomConnection NotImplementedException #122

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Dax.Model.Extractor/Data/IDbConnectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static IDbCommand CreateCommand(this IDbConnection connection, string com
AdomdConnection adomdConnection => new AdomdCommand(commandText, adomdConnection),
OleDbConnection oledbConnection => new OleDbCommand(commandText, oledbConnection),
TomConnection tomConnection => new TomCommand(commandText, tomConnection),
_ => throw new ExtractorException(connection),
_ => connection.CreateCommand(commandText)
};
}
}
Expand Down
21 changes: 8 additions & 13 deletions src/Dax.Model.Extractor/Data/TomConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,29 @@ public void Dispose()
{
}

#region Methods and properties that throw a NotImplementedException
public ConnectionState State => Server.GetConnectionState(false);

public string ConnectionString {
get { throw new NotImplementedException(); }
set { throw new NotImplementedException(); }
get { return Server.ConnectionString; }
set { throw new InvalidOperationException(); }
}
public int ConnectionTimeout => Server.ConnectionInfo.Timeout;

public int ConnectionTimeout {
get { throw new NotImplementedException(); }
}

public ConnectionState State {
get { throw new NotImplementedException(); }
}
#region Methods and properties that throw a NotSupportedException

public IDbTransaction BeginTransaction()
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public IDbTransaction BeginTransaction(IsolationLevel il)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

public void ChangeDatabase(string databaseName)
{
throw new NotImplementedException();
throw new NotSupportedException();
}

#endregion
Expand Down