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

mysql does not seem to support the TIME type #563

Closed
zcmaye opened this issue Mar 28, 2024 · 4 comments
Closed

mysql does not seem to support the TIME type #563

zcmaye opened this issue Mar 28, 2024 · 4 comments

Comments

@zcmaye
Copy link

zcmaye commented Mar 28, 2024

No description provided.

@zcmaye
Copy link
Author

zcmaye commented Mar 28, 2024

CREATE TABLE test_datetime
(
    id INT PRIMARY KEY AUTO_INCREMENT,
    fdate DATE NOT NULL,
    ftime TIME NOT NULL,
    fdate_time DATETIME NOT NULL
);

execution query.

sqlpp::mysql::connection db(config);
for(const auto& row : db(sqlpp::select(sqlpp::all_of(tb)).from(tb).unconditionally())) 
{
      std::cout << row.id << " " << row.fdate << " " << row.ftime << " " << row.fdateTime << std::endl;
}

Bad, wrong.

[build] C:\Program Files (x86)\sqlpp11\include\sqlpp11/data_types/time_of_day/result_field.h(46): error C2039: "_bind_time_of_day_result": not is "sqlpp::mysql::char_result_t"  a memeber.
[build] C:\Program Files (x86)\sqlpp11\include\sqlpp11/mysql/char_result.h(44): note: see also “sqlpp::mysql::char_result_t”  statement

I checked mysql/char_result.h really don't have _bind_time_of_day_resul function.

help me,thanks!

@rbock
Copy link
Owner

rbock commented Mar 29, 2024

Thanks for the report. I added the missing functions plus respective tests.

Hope this helps?

@zcmaye
Copy link
Author

zcmaye commented Mar 29, 2024

All right, thank you

Thanks for the report. I added the missing functions plus respective tests.

Hope this helps?

All right, thank you

@rbock
Copy link
Owner

rbock commented Mar 30, 2024

Thanks for the confirmation.

@rbock rbock closed this as completed Mar 30, 2024
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