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

Serializer for explicit column dosn't find correct column #933

Closed
trueqbit opened this issue Mar 5, 2022 · 1 comment
Closed

Serializer for explicit column dosn't find correct column #933

trueqbit opened this issue Mar 5, 2022 · 1 comment

Comments

@trueqbit
Copy link
Collaborator

trueqbit commented Mar 5, 2022

There's a line for the statement serializer of a column_pointer that tries to get the column name like this:

std::string statement_serializator<column_pointer<T, F>>::operator()(const column_pointer<T, F>& cp, const C& context) const {
    // ...
    if(auto columnNamePointer = context.impl.column_name_simple(cp.field)) {
    }
    // ...
}

This however is wrong for two reasons:

  1. storage_impl<>::column_name_simple() doesn't walk the 'table storage chain'
  2. the serializer should actually call storage_impl<>::column_name(cp)

I guess this was just an oversight in the first place as column_name(column_pointer<>) exists but remained unused, and the original intention was to use it.

@fnc12
Copy link
Owner

fnc12 commented Mar 5, 2022

yeah looks like an oversight

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

2 participants