当前位置: 首页>>代码示例>>C#>>正文


C# TableName类代码示例

本文整理汇总了C#中TableName的典型用法代码示例。如果您正苦于以下问题:C# TableName类的具体用法?C# TableName怎么用?C# TableName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TableName类属于命名空间,在下文中一共展示了TableName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MockTable

 public MockTable(TableName name)
 {
     this.name = name;
     columns = new ColumnCollection(this);
     rows = new Dictionary<RowId, TableRow>();
     rowIndex = new List<RowId>();
 }
开发者ID:ikvm,项目名称:deveelsql,代码行数:7,代码来源:MockTable.cs

示例2: Search

        public static TableName[] Search(string pattern, TableName[] tableNames)
        {
            Regex regex = pattern.WildcardRegex();
            var result = tableNames.Where(tname => regex.IsMatch(tname.Name)).ToArray();

            return result;
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:7,代码来源:MatchedDatabase.cs

示例3: CreateTable

        public SystemTable CreateTable(TableName tableName)
        {
            CheckNotDisposed();
            // Check the table name given is qualified
            CheckTableNameQualified(tableName);

            // Does an object with this name already exist in the directory?
            ITable tables = GetTable(SystemTableNames.Tables);
            IRowCursor ind = GetNames(tables, tableName);
            if (ind.Count > 0)
                throw new ApplicationException("Table '" + tableName + "' already exists.");

            ITable table = state.CreateTable(tableName);
            if (table == null)
                throw new ApplicationException("The table '" + tableName + "' was not created.");

            long tableId = state.CreateUniqueId(SystemTableNames.Tables);

            // Construct and create the table
            SystemTable sysTable = new SystemTable(this, table, tableId);

            // Add this table to the tables.
            AddObject(tableId, tableName, "TABLE");

            // Log the change in the journal
            journal.AddEntry(JournalCommandCode.TableCreate, tableId);
            OnChanged();

            // Put it in the cache
            tableNameMap[tableName] = sysTable;

            // And return it
            return sysTable;
        }
开发者ID:ikvm,项目名称:deveelsql,代码行数:34,代码来源:SystemTransaction_Tables.cs

示例4: Register

        /// <summary>
        /// Register Logee Implement
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="tableId"></param>
        /// <param name="logee"></param>
        public void Register(TableName tableName, IRowLogee logee)
        {
            if (rowLogees.ContainsKey(tableName))
                rowLogees.Remove(tableName);

            rowLogees.Add(tableName, logee);
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:13,代码来源:LogManager.cs

示例5: TableBase

        protected TableBase(TableName tableName)
        {
            this.tableName = tableName;
            columns = new ColumnCollection(this);

            DoSetupColumns();
        }
开发者ID:ikvm,项目名称:deveelsql,代码行数:7,代码来源:TableBase.cs

示例6: Exporter

 public Exporter(PathManager mgr, TreeNode<IDataPath> pt, Configuration cfg)
 {
     this.mgr = mgr;
     this.cfg = cfg;
     this.xml = new XmlDbFile { XmlDbFolder = cfg.XmlDbFolder };
     this.fileName = cfg.OutputFile;
     if (pt.Item is Locator)
     {
         this.tname = mgr.GetPathFrom<TableName>(pt);
         this.dname = tname.DatabaseName;
         this.sname = dname.ServerName;
     }
     else if (pt.Item is TableName)
     {
         this.tname = (TableName)pt.Item;
         this.dname = tname.DatabaseName;
         this.sname = dname.ServerName;
     }
     else if (pt.Item is DatabaseName)
     {
         this.tname = null;
         this.dname = (DatabaseName)pt.Item;
         this.sname = dname.ServerName;
     }
     else if (pt.Item is ServerName)
     {
         this.tname = null;
         this.dname = null;
         this.sname = (ServerName)pt.Item;
     }
 }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:31,代码来源:Exporter.cs

示例7: ReadRange

 /// <summary>
 /// Reads all rows out of multiple local flat-files for the specified date range and table name
 /// </summary>
 /// <param name="startDay">The start day and time to grab rows from.</param>
 /// <param name="endDay">The end day and time to grab rows from.</param>
 /// <param name="name">Name of the table to grab data from.</param>
 /// <returns>Returns a DataSet that contains all rows that were created inbetween the start and end datetime stamps</returns>
 public static DataSet ReadRange(DateTime startDay, DateTime endDay, TableName name)
 {
     DataTable table;
     if (startDay > endDay) {
         throw new ArgumentOutOfRangeException("startDay", "startDay cannot be newer than endDay");
     }
     DataSet set = new DataSet();
     if (startDay.Date < endDay.Date) {
         table = ReadDay(startDay, name, true);
         if (table != null) {
             set.Tables.Add(table);
         }
         startDay = startDay.Date.AddDays(1.0);
     }
     while (startDay < endDay) {
         table = ReadDay(startDay, name, true);
         if (table != null) {
             set.Tables.Add(table);
         }
         startDay = startDay.AddDays(1.0);
     }
     if (startDay.Date == endDay.Date) {
         table = ReadDay(endDay, name, false);
         if (table != null) {
             set.Tables.Add(table);
         }
         endDay = new DateTime(endDay.Year, endDay.Month, endDay.Day, 0x17, 0x3b, 0x3b);
     }
     return set;
 }
开发者ID:DigenGada,项目名称:lucene-dotnet-api,代码行数:37,代码来源:AnalysisReader.cs

示例8: Difference

        public static string Difference(DataProvider from, DataProvider to, string dbNameFrom, string dbNameTo)
        {
            DatabaseName dname1 = new DatabaseName(from, dbNameFrom);
            DatabaseName dname2 = new DatabaseName(to, dbNameTo);

            string[] names = MetaDatabase.GetTableNames(dname1);

            StringBuilder builder = new StringBuilder();
            foreach (string tableName in names)
            {
                TableName tname1 = new TableName(dname1, tableName);
                TableName tname2 = new TableName(dname2, tableName);

                string[] primaryKeys = InformationSchema.PrimaryKeySchema(tname1).ToArray<string>(0);
                if (primaryKeys.Length == 0)
                    continue;

                if (MetaDatabase.TableExists(tname2))
                {
                    builder.Append(TableCompare.Difference(tname1, tname2, tableName, primaryKeys));
                }
                else
                {
                    builder.Append(TableCompare.Rows(tableName, from));
                }

                builder.AppendLine();
            }

            return builder.ToString();
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:31,代码来源:DatabaseCompare.cs

示例9: Includes

        public bool Includes(TableName tableName)
        {
            if (Excludedtables == null)
                return true;

            return !Excludedtables.IsMatch(tableName.ShortName);
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:7,代码来源:MatchedDatabase.cs

示例10: IntegrityRule

 internal IntegrityRule(TableName name, TableName tableName, IntegrityRuleKind kind, string[] columnNames)
 {
     this.name = name;
     this.columnNames = columnNames;
     this.kind = kind;
     this.tableName = tableName;
 }
开发者ID:ikvm,项目名称:deveelsql,代码行数:7,代码来源:IntegrityRule.cs

示例11: SqlTableSchema

        public static DataTable SqlTableSchema(TableName tableName)
        {
            DataTable dt1;
            string SQL = string.Format(SQL_SCHEMA, "", "WHERE t.name='{0}'");
            dt1 = Use(tableName, SQL);

            return dt1;
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:8,代码来源:InformationSchema.cs

示例12: Variable

 public Variable(TableName tableName, string columnName)
 {
     if (tableName == null || columnName == null) {
         throw new ArgumentNullException();
     }
     this.table_name = tableName;
     this.column_name = columnName;
 }
开发者ID:ikvm,项目名称:deveelsql,代码行数:8,代码来源:Variable.cs

示例13: Exists

        public virtual bool Exists(TableName tname)
        {
            DatabaseName dname = tname.DatabaseName;
            if (!Exists(dname))
                return false;

            return GetTableNames(dname).FirstOrDefault(row => row.Equals(tname)) != null;
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:8,代码来源:DbSchemaProvider.cs

示例14: BaseRowAdapter

        public BaseRowAdapter(TableName tname, Locator locator)
        {
            this.columns = new ColumnAdapterCollection();
            this.fields = new DataFieldCollection();

            this.tableName = tname;
            this.locator = locator;
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:8,代码来源:BaseRowAdapter.cs

示例15: TableWriter

        /// <summary>
        /// use default locator to save records into database, primary keys must be defined
        /// </summary>
        /// <param name="tableName"></param>
        public TableWriter(TableName tableName)
        {
            this.schema = tableName.GetTableSchema();

            IPrimaryKeys primary = schema.PrimaryKeys;
            if (primary.Length != 0)
                this.locator = new Locator(primary);
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:12,代码来源:TableWriter.cs


注:本文中的TableName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。