public string Convert(CSchema schema) { string[] parts = { schema.SchemaName }; var createSchemaStatement = new CreateSchemaStatement(); createSchemaStatement.Name = new Identifier { Value = schema.SchemaName }; //generate DDL var script = new TSqlScript(); var batch = new TSqlBatch(); script.Batches.Add(batch); batch.Statements.Add(createSchemaStatement); var dacpacModel = new TSqlModel(SqlServerVersion.Sql120, new TSqlModelOptions()); var existing = dacpacModel.GetObject(Schema.TypeClass, new ObjectIdentifier(parts), DacQueryScopes.All); if (existing != null) { return(existing.GetScript()); } dacpacModel.AddObjects(script); existing = dacpacModel.GetObject(Schema.TypeClass, new ObjectIdentifier(parts), DacQueryScopes.All); return(existing.GetScript()); }
public CrosswordFight() { State = EState.Begin; Players = new List <Player>() { new Player("1"), new Player("2") }; Schema = new CSchema(6, 6); CurrentPlayer = 0; }
public CFileSystemStorage(CSchema aSchema, DirectoryInfo aDirectoryInfo) : base(aSchema) { if (aSchema.IsNullRef()) { throw new ArgumentNullException(nameof(aSchema)); } if (aDirectoryInfo.IsNullRef()) { throw new ArgumentNullException(nameof(aDirectoryInfo)); } this.DirectoryInfo = aDirectoryInfo; }
public string GetFlywayFileName(CSchema schema) { return($"{FlywayVersionNumber}__Create_Schema_{schema.SchemaName}.sql"); }
public string Convert(CSchema schema) { return($@"CREATE SCHEMA IF NOT EXISTS {schema.SchemaName.WrapReservedAndSnakeCase(DataStoreTypes.MySql, schema.ConvertToSnakeCase)};"); }
public FormCrosswordEditor() { InitializeComponent(); _schema = new CSchema(10, 10); h_RefreshField(true); }
public CNullStorage(CSchema aSchema) : base(aSchema) { }
protected CStorage(CSchema aSchema) { this.Schema = aSchema; }