Ejemplo n.º 1
0
        public override string BuildSql(SqlOptions sqlOptions)
        {
            var command   = sqlOptions.Command("UPDATE");
            var tableName = TableName.BuildSql(sqlOptions, FlowOptions.Construct(this));

            return($"{command} {tableName}");
        }
Ejemplo n.º 2
0
        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}");
        }
Ejemplo n.º 3
0
        public override string BuildSql(SqlOptions sqlOptions)
        {
            var tableName = Entity.BuildSql(sqlOptions, FlowOptions.Construct(this));
            var command   = sqlOptions.Command("INSERT INTO");

            return($"{command} {tableName}");
        }