Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

주제가 있는 단어를 한번에 삭제할 수 있나요? #973

Closed
wijian43891 opened this issue Feb 11, 2022 · 4 comments
Closed

주제가 있는 단어를 한번에 삭제할 수 있나요? #973

wijian43891 opened this issue Feb 11, 2022 · 4 comments

Comments

@wijian43891
Copy link

No description provided.

@lshqqytiger
Copy link
Contributor

lshqqytiger commented Feb 11, 2022

#689

In SQL

/* ko */
DELETE FROM kkutu_ko WHERE "theme" != '0';
/* en */
DELETE FROM kkutu_en WHERE "theme" != '0';

In JavaScript (collection.js)

// ko
MainDB.kkutu["ko"].remove([ "theme", { "$not": "0" } ]).on();
// en
MainDB.kkutu["en"].remove([ "theme", { "$not": "0" } ]).on();

In JavaScript (TypeORM, #958 )

const ko = await MainDB.kkutu["ko"].find({ where: { theme: Not("0") } });
const en = await MainDB.kkutu["en"].find({ where: { theme: Not("0") } });
MainDB.remove([ ...ko, ...en ]);

@wijian43891
Copy link
Author

마침 SQL 어떻게 하는지 궁금했었는데,, 감사합니다

@june2007
Copy link

june2007 commented Oct 3, 2022

좀 엄청 많이 뒷북이기느 한데 만약 외국영화(WMV)를 삭제하려면 DELETE FROM kkutu_ko WHERE "theme_WMV" != '0';
이런식으로 하면 되나요?

@lshqqytiger
Copy link
Contributor

lshqqytiger commented Oct 3, 2022

아니요. 이 이슈는 어떤 주제든 주제를 가지고 있는 모든 단어를 삭제하는 방법에 관한 것입니다. 특정 주제를 가진 단어를 삭제하는 것이 아닙니다.
WHERE ... LIKE ...로 특정 주제를 가진 모든 단어를 삭제하실 수 있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants