◆ Operation() [1/3]
template<class SRC, class DST>
| bool duckdb::TryCastErrorMessageCommaSeparated::Operation |
( |
SRC | input, |
|
|
DST & | result, |
|
|
CastParameters & | parameters ) |
|
inlinestatic |
31223 {
31225 }
PhysicalType GetTypeId()
Returns the PhysicalType for the given type.
Definition duckdb.hpp:10381
◆ Operation() [2/3]
template<>
| bool duckdb::TryCastErrorMessageCommaSeparated::Operation |
( |
string_t | input, |
|
|
float & | result, |
|
|
CastParameters & | parameters ) |
89630 {
89631 if (!TryDoubleCast<float>(input.GetData(), input.GetSize(), result, parameters.strict, ',')) {
89632 HandleCastError::AssignError(
StringUtil::Format(
"Could not cast string to float: \"%s\"", input.GetString()),
89633 parameters);
89634 return false;
89635 }
89636 return true;
89637}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
◆ Operation() [3/3]
template<>
| bool duckdb::TryCastErrorMessageCommaSeparated::Operation |
( |
string_t | input, |
|
|
double & | result, |
|
|
CastParameters & | parameters ) |
89640 {
89641 if (!TryDoubleCast<double>(input.GetData(), input.GetSize(), result, parameters.strict, ',')) {
89642 HandleCastError::AssignError(
StringUtil::Format(
"Could not cast string to double: \"%s\"", input.GetString()),
89643 parameters);
89644 return false;
89645 }
89646 return true;
89647}
The documentation for this struct was generated from the following file: