-
Notifications
You must be signed in to change notification settings - Fork 0
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
Delete And Drop Statements #21
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abdomustafafouaad Great job ya Abdo 🎉
Please add compile/
and .cache/
to .gitignore
and execute git rm --cached compile/ .cache/
if (nftw((m_base_path + "/" + table_name).c_str(), | ||
//its an anonymous function and i dont know how to style it in our style | ||
[](const char *pathname, const struct stat *sbuf, int type, struct FTW *ftwb) { | ||
if(remove(pathname) < 0) | ||
{ | ||
util::Logger::make().err("Error writing Metadata: %d", errno); | ||
return -1; | ||
} | ||
return 0; | ||
} , | ||
10, | ||
FTW_DEPTH|FTW_MOUNT|FTW_PHYS) < 0) | ||
{ | ||
util::Logger::make().err("Error writing Metadata: %d", errno); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this styling
auto remove_fn = [](const char *pathname, const struct stat *sbuf, int type, struct FTW *ftwb) {
if(remove(pathname) < 0) {
util::Logger::make().err("Error couldn't remove %s: %d", pathname, errno);
return -1;
}
return 0;
};
if (nftw((m_base_path + "/" + table_name).c_str(), remove_fn, 10,
FTW_DEPTH|FTW_MOUNT|FTW_PHYS) < 0) {
util::Logger::make().err("Error couldn't delete table : %d", table_name.c_str(), errno);
}
dynamic_cast<lang::DropTableStatement *>(statement); | ||
dorp_table_statement != nullptr) { | ||
auto result = dorp_table_statement->execute(db); | ||
std::cout << dorp_table_statement->m_table << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this now and change data members to private
No description provided.