コード例 #1
0
        public long TruncateTable()
        {
            long rows = 0;

            if (TYPE == TableSchamaType.TABLE && Exists)
            {
                var command = GetTruncateCommand();
                rows = DBAccessor.ExecuteSQLCommand(command);
            }
            return(rows);
        }
コード例 #2
0
        public bool CreateTableBySchama(TableSchama source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("parameter(source) is null!", "source");
            }
            bool result  = false;
            var  command = source.GetCreateCommand(this.TableName);

            if (command != null)
            {
                result = DBAccessor.ExecuteSQLCommand(command) >= 0;
            }
            Fresh();
            return(result);
        }