DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Statements.DropTableStatement Class Reference
Inheritance diagram for Deveel.Data.Sql.Statements.DropTableStatement:
Deveel.Data.Sql.Statements.SqlStatement Deveel.Data.Sql.Statements.IPreparableStatement Deveel.Data.Sql.Statements.IStatement Deveel.Data.Serialization.ISerializable Deveel.Data.Sql.Statements.IStatement Deveel.Data.Sql.IExecutable Deveel.Data.Sql.IExecutable

Classes

class  Prepared
 

Public Member Functions

 DropTableStatement (string[] tableNames)
 
 DropTableStatement (string[] tableNames, bool ifExists)
 
 DropTableStatement (string tableName)
 
 DropTableStatement (string tableName, bool ifExists)
 
- Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
ITable Execute (IRequest context)
 Prepares and evaluates this statement into a tabular result. More...
 

Properties

string[] TableNames [get, private set]
 
bool IfExists [get, set]
 
- Properties inherited from Deveel.Data.Sql.Statements.SqlStatement
SqlQuery SourceQuery [get, set]
 Gets the SqlQuery that is the origin of this statement. More...
 
bool IsFromQuery [get, private set]
 Gets a boolean value indicating if this object was formed from the parsing of a SqlQuery or if it was manually created. More...
 
- Properties inherited from Deveel.Data.Sql.Statements.IStatement
SqlQuery SourceQuery [get]
 

Private Member Functions

IStatement IPreparableStatement. Prepare (IRequest context)
 

Additional Inherited Members

- Static Public Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
static IEnumerable< SqlStatementParse (string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, string sqlSource)
 Parses a given string into one of more statements. More...
 
static IEnumerable< SqlStatementParse (IContext context, SqlQuery query)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
 SqlStatement ()
 
 SqlStatement (ObjectData data)
 
virtual void ExecuteStatement (ExecutionContext context)
 
virtual void GetData (SerializeData data)
 
- Package Functions inherited from Deveel.Data.Sql.Statements.SqlStatement
void SetSource (SqlQuery query)
 

Detailed Description

Definition at line 25 of file DropTableStatement.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Statements.DropTableStatement.DropTableStatement ( string[]  tableNames)
inline

Definition at line 26 of file DropTableStatement.cs.

27  : this(tableNames, false) {
28  }
Deveel.Data.Sql.Statements.DropTableStatement.DropTableStatement ( string[]  tableNames,
bool  ifExists 
)
inline

Definition at line 30 of file DropTableStatement.cs.

30  {
31  if (tableNames == null)
32  throw new ArgumentNullException("tableNames");
33  if (tableNames.Length == 0)
34  throw new ArgumentException("The table name list cannot be empty", "tableNames");
35 
36  if (tableNames.Any(String.IsNullOrEmpty))
37  throw new ArgumentException("One of the specified table names is null.");
38 
39  TableNames = tableNames;
40  IfExists = ifExists;
41  }
A long string in the system.
Deveel.Data.Sql.Statements.DropTableStatement.DropTableStatement ( string  tableName)
inline

Definition at line 43 of file DropTableStatement.cs.

44  : this(tableName, false) {
45  }
Deveel.Data.Sql.Statements.DropTableStatement.DropTableStatement ( string  tableName,
bool  ifExists 
)
inline

Definition at line 47 of file DropTableStatement.cs.

48  : this(new[] {tableName}, ifExists) {
49  }

Member Function Documentation

IStatement IPreparableStatement. Deveel.Data.Sql.Statements.DropTableStatement.Prepare ( IRequest  context)
inlineprivate

Implements Deveel.Data.Sql.Statements.IPreparableStatement.

Definition at line 55 of file DropTableStatement.cs.

55  {
56  var tableNameList = TableNames.ToList();
57  var dropTables = new List<string>();
58 
59  foreach (var tableName in tableNameList) {
60  if (dropTables.Contains(tableName, StringComparer.OrdinalIgnoreCase))
61  throw new StatementPrepareException(String.Format("Duplicated table name '{0}' in the list of tables to drop.",
62  tableName));
63 
64  dropTables.Add(tableName);
65  }
66 
67  var resolvedTableNames = dropTables.Select(context.Query.ResolveTableName);
68 
69  return new Prepared(resolvedTableNames.ToArray(), IfExists);
70  }
A long string in the system.

Property Documentation

bool Deveel.Data.Sql.Statements.DropTableStatement.IfExists
getset

Definition at line 53 of file DropTableStatement.cs.

string [] Deveel.Data.Sql.Statements.DropTableStatement.TableNames
getprivate set

Definition at line 51 of file DropTableStatement.cs.


The documentation for this class was generated from the following file: