Skip to content

Compilation Error #1

@teon

Description

@teon

Compiling vert v0.1.1 (/home/teon/x/vert) error:DATABASE_URLmust be set, orcargo sqlx preparemust have been run and .sqlx must exist, to use query macros --> src/package.rs:43:9 | 43 | / query_as!( 44 | | Self, 45 | | "INSERT INTO package (distname, master_site, version, local_version, last_check) \ 46 | | VALUES ($1, $2, $3, $4, $5) RETURNING *", ... | 51 | | last_check 52 | | ) | |_________^ | = note: this error originates in the macro$crate::sqlx_macros::expand_querywhich comes from the expansion of the macroquery_as` (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:80:13
|
80 | / query_as!(
81 | | Self,
82 | | "UPDATE package SET distname = $2, master_site = $3, local_version = $4
83 | | WHERE id = $1",
... |
87 | | self.local_version,
88 | | )
| |_____________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query_as (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:97:9
|
97 | / query_as!(
98 | | Self,
99 | | "SELECT id, distname "distname!", master_site "master_site!", version "version!", local_version, last_check
100 | | FROM package WHERE distname = $1",
101 | | name
102 | | ).fetch_one(pool).await
| |_________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query_as (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:106:20
|
106 | let pkgs = query_as!(
| ___________^
107 | | Self,
108 | | "SELECT id, distname "distname!", master_site "master_site!", version "version!", local_version, last_check
109 | | FROM package ORDER BY distname",
110 | | ).fetch_all(pool).await?;
| |
^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query_as (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:120:9
|
120 | query_scalar!("SELECT count(*) FROM package WHERE local_version != version")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query_scalar (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:143:9
|
143 | / query_as!(
144 | | Self,
145 | | "SELECT id, distname "distname!", master_site "master_site!", version "version!", local_version, last_check
146 | | FROM package ORDER BY distname"
147 | | ).fetch(pool)
| |_________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query_as (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:167:13
|
167 | / query!(
168 | | "UPDATE package SET master_site = $2 WHERE id = $1",
169 | | self.id,
170 | | self.master_site
171 | | )
| |_____________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:183:9
|
183 | / query!(
184 | | "UPDATE package SET version = $2, last_check = $3 WHERE id = $1",
185 | | self.id,
186 | | self.version,
187 | | self.last_check,
188 | | )
| |_________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:207:9
|
207 | / query!(
208 | | "UPDATE package SET local_version = $2, last_check = $3 WHERE id = $1",
209 | | self.id,
210 | | self.version,
211 | | self.last_check,
212 | | )
| |_________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:252:9
|
252 | / query!(
253 | | "UPDATE package SET last_check = $3 WHERE id = $1",
254 | | self.id,
255 | | self.last_check,
256 | | )
| |_________^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query (in Nightly builds, run with -Z macro-backtrace for more info)

error: DATABASE_URL must be set, or cargo sqlx prepare must have been run and .sqlx must exist, to use query macros
--> src/package.rs:265:9
|
265 | query!("DELETE FROM package WHERE id = $1", self.id,)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro $crate::sqlx_macros::expand_query which comes from the expansion of the macro query (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile vert (lib) due to 11 previous errors
warning: build failed, waiting for other jobs to finish...

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions