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

unsupported type NULL error only on my machine #3546

Open
tmvkrpxl0 opened this issue Oct 5, 2024 · 0 comments
Open

unsupported type NULL error only on my machine #3546

tmvkrpxl0 opened this issue Oct 5, 2024 · 0 comments
Labels

Comments

@tmvkrpxl0
Copy link

Bug Description

sqlx::query_file!("src/queries/leaderboard.sql") this has error:

unsupported type NULL of column #1 ("user")

the leaderboard.sql in question is:

select
	`user`,
	count(
		distinct date(`joined`, '+09:00')
	) as days,
	coalesce(
		sum(unixepoch(coalesce(`left`, 'now')) - unixepoch(`joined`)),
	0) as `total_duration`
from
	`vc_activities`
group by
	`user`
order by
	`total_duration` desc
limit 5

but this error does not happen on my friend's pc.

Minimal Reproduction

https://github.com/tmvkrpxl0/sqlx-report
I used sqlx-cli to setup database like this:

sqlx database create
sqlx migrate run

Then ran cargo build and got the same error

Info

  • SQLx version: 0.8.2, Both release on crate.io and git clone have this issue
  • SQLx features enabled: ["runtime-tokio", "sqlite"].
  • Database server and version: Me: (3.37.2), My friend: (3.46.1)
  • Operating system: Me: (KDE Neon 22.04), My friend: (Arch linux)
  • rustc --version: rustc 1.81.0
@tmvkrpxl0 tmvkrpxl0 added the bug label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant