Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Sequel API 中是否有任何内容允许我指定要使用的索引?
生成的 SQL 应如下所示:
SELECT * FROM Users WITH (INDEX(idx_name))
Sequel 没有明确支持该语法,但您可以伪造它:
DB.from('Users WITH (INDEX(idx_name))'.lit)
不过,它不会是完美的(连接可能会破坏它)。修改适配器以在 DSL、FWIW 中添加对该语法的直接支持并不难。