예제 #1
0
 public string GetSql(TableCreationData data)
 {
     _data = data;
     _tableName = _provider.EscapeTableName(data.TableName);
   
     _sb.AppendLine("create table " + _tableName + "(");
     AddColumns(data.Columns);
     AddConstraints(data.PrimaryKey);
     AddConstraints(data.ForeignKeys);
     _sb.Append(");");
     AddIndexes(data.Indexes);
     return _sb.ToString();
 }
예제 #2
0
        public string GetSql(TableCreationData data)
        {
            _data      = data;
            _tableName = _provider.EscapeTableName(data.TableName);

            _sb.AppendLine("create table " + _tableName + "(");
            AddColumns(data.Columns);
            AddConstraints(data.PrimaryKey);
            AddConstraints(data.ForeignKeys);
            _sb.Append(");");
            AddIndexes(data.Indexes);
            return(_sb.ToString());
        }