minato 开发日记

长期更新。

怎么大家都在写开(摸)发(:fish:)日记,
那么我也来摸一个。
希望未来的我想不起来这里写了啥的时候能借助本贴想起来【】

提醒:
1.本贴不是教程/文档(咕咕咕了)
2.大量技术细节、不稳定特性、未实装功能警告
3.梦梦的声音好听
5.大家一起摸鱼吧

image

2 个赞

今日的兼容性测试

UPDATE
    `temp2` kpxcyhpq
SET
    `text` = (
        SELECT
            max(`text`)
        FROM
            `temp2` pfqwlbah
        WHERE
            (`id` = (1 + `kpxcyhpq`.`id`))
    )
WHERE
    `id` = 1

SQLite MySQL Postgres

报错:ER_UPDATE_TABLE_USED: You can’t specify target table ‘kpxcyhpq’ for update in FROM clause
解决:在中间套一层select

SELECT
    count(distinct "mmtmndcm"."id") :: integer AS value
FROM
    "foo" AS "nlpskdrc"
    JOIN "bar" AS "mmtmndcm" ON TRUE
WHERE
    ("mmtmndcm"."id" > 3)
ORDER BY
    "mmtmndcm"."id" ASC

SQLite MySQL Postgres

报错:PostgresError: column “mmtmndcm.id” must appear in the GROUP BY clause or be used in an aggregate function
解决:在中间套一层select

结论: 试图兼容以上优化会直接破坏当前sql-utils中核心逻辑的高度复用性,感觉不如。。

3 个赞

嗯。。论坛的本质是自言自语,所以我应该可以写一些按照原则我不会讲的事情

比如现在全身弥漫着的梦梦的气味

以及「进度还不到80%所以还只是个草稿的设计」

2 个赞
  • Eval.Expr[kInclude]: Record<RefType, Field>
    mapping of all involved views / relations / joined tables / derived tables in current subtree
    to re-order filter expressions in multi-table environment
1 个赞