Class GetTableListTask
Returns a list of all tables in the currently connected database.
Make sure to connect with the correct permissions!
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.ControlFlow
Assembly: ETLBox.dll
Syntax
public sealed class GetTableListTask : GetListTask, ILoggableTask
Examples
List<ETLBox.Helper.ObjectNameDescriptor> alltables = GetTableListTask.List();
foreach (var on in alltables) {
Console.WriteLine("Schema:" + on.UnquotatedSchemaName);
Console.WriteLine("TableName:" + on.UnquotatedObjectName);
Console.WriteLine("Full qualified name:" + on.QuotatedFullName);
}
Constructors
GetTableListTask()
Declaration
public GetTableListTask()
Examples
List<ETLBox.Helper.ObjectNameDescriptor> alltables = GetTableListTask.List();
foreach (var on in alltables) {
Console.WriteLine("Schema:" + on.UnquotatedSchemaName);
Console.WriteLine("TableName:" + on.UnquotatedObjectName);
Console.WriteLine("Full qualified name:" + on.QuotatedFullName);
}
Properties
TaskName
Declaration
public override string TaskName { get; set; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
ListAll()
Runs sql code to determine all user database names.
Declaration
public static List<ObjectNameDescriptor> ListAll()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T><ObjectNameDescriptor> | A list of all user database names |
ListAll(IConnectionManager)
Runs sql code to determine all user database names.
Declaration
public static List<ObjectNameDescriptor> ListAll(IConnectionManager connectionManager)
Parameters
Type | Name | Description |
---|---|---|
IConnectionManager | connectionManager | The connection manager of the server you want to connect |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T><ObjectNameDescriptor> | A list of all user database names |