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.
我有一个名为“帐户”的实体,它将有一个用户名列,我想以此作为索引,因为我将在登录时使用它来查找用户名。
我如何告诉 redbean orm 我希望此表具有要索引的列“用户名”以便更快地查找?我是否必须手动更新数据库而不是通过 redbean orm?
我想这就是你所追求的:
R::$writer->addIndex('account','userindex','username');