Comments (5)
ok @weiznich , Let me try it.
from diesel.
Thanks for opening this bug report.
Seems like it's just missing the BigDecimal
type in this list of allowed types:
diesel/diesel_derives/src/table.rs
Line 577 in 12429cb
Mind submitting a PR that adds it there + adds a test somewhere in diesel_test
from diesel.
Hi @weiznich , Sorry, I'm new to rust, Can you guide me how to setup the working env for the diesel. When I clone the repository to my local machine and try to run cargo t, it has some errors
error[E0432]: unresolved import `diesel`
--> diesel/src/expression/functions/date_and_time.rs:30:1
|
30 | / define_sql_function! {
31 | | /// Represents the SQL `DATE` function. The argument should be a Timestamp
32 | | /// expression, and the return value will be an expression of type Date.
33 | | ///
... |
50 | | fn date(expr: Timestamp) -> Date;
51 | | }
| |_^ could not find `sqlite` in the crate root
|
= note: this error originates in the macro `define_sql_function` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `diesel`
--> diesel/src/sql_types/mod.rs:40:48
|
40 | #[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
| ^^^^^^^ could not find `pg` in the crate root
|
= note: this error originates in the derive macro `SqlType` (in Nightly builds, run with -Z macro-backtrace for more info)
Thanks so much.
from diesel.
It depends a bit on where exactly you've called cargo test
, but in general you always need to set some feature flags to enable one or the other backend. The contribution documentation has some more details and there is the bin/test
script which executes most of the tests in the repo.
For the diesel
crate itself you usually want something like DATABASE_URL=… cargo test --features "{backend_to_test} extras"
where {backend_to_test}
is one of postgres
, mysql
or sqlite
.
from diesel.
Fixed by #4102
from diesel.
Related Issues (20)
- Is the `delete` fn description outdated?
- i saw this and is there a way to disable it calling? HOT 5
- Provide a `r2d2::CustomizeConnection` for testing HOT 3
- Add support for currently unsupported array functions HOT 17
- Diesel 2.2.2 with 128-column-tables feature hangs on RustRover but works on VSCode HOT 2
- diesel-cli with --locked-schema fails when schema.rs has CRLF newlines
- Unable to install diesel-cli, Did not find a compatible version of libmysqlclient, Ensure that you installed one and teached mysqlclient-sys how to find it
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
- array methods breaks index method HOT 3
- Print a diff if `diesel print-schema --locked` fails due to a mismatch HOT 1
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
- Add support for currently unsupported postgres json/jsonb functions HOT 11
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
- Undefined behavior when using `diesel::sql_query` with an empty string for Sqlite HOT 2
- MigrationHarness::pending_migrations() doesn't check for incompatible migrations HOT 2
- Add support for currently unsupported Postgres multirange functions HOT 2
- RUSTSEC-2024-0365: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diesel.