public override string BuildSql(SqlOptions sqlOptions) { var command = sqlOptions.Command("UPDATE"); var tableName = TableName.BuildSql(sqlOptions, FlowOptions.Construct(this)); return($"{command} {tableName}"); }
public override string BuildSql(SqlOptions sqlOptions) { string joinType; switch (JoinType) { case JoinType.Inner: joinType = "INNER JOIN"; break; case JoinType.Left: joinType = "LEFT JOIN"; break; case JoinType.Right: joinType = "RIGHT JOIN"; break; case JoinType.FullOuter: joinType = "FULL OUTER JOIN"; break; default: throw new ArgumentException(nameof(JoinType)); } var command = sqlOptions.Command(joinType); var table = TableEntity.BuildSql(sqlOptions, FlowOptions.Construct(this)); var on = OnBlock.BuildSql(sqlOptions, FlowOptions.Construct(this)); return($"{command} {table} {on}"); }
public override string BuildSql(SqlOptions sqlOptions) { var tableName = Entity.BuildSql(sqlOptions, FlowOptions.Construct(this)); var command = sqlOptions.Command("INSERT INTO"); return($"{command} {tableName}"); }