-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
WIP: Feat/Stripe: Added more object of the stripe products categorie #101
Conversation
@@ -97,6 +97,8 @@ fn body_to_rows( | |||
.and_then(|v| match *col_type { | |||
"bool" => v.as_bool().map(Cell::Bool), | |||
"i64" => v.as_i64().map(Cell::I64), | |||
"f64" => v.as_f64().map(Cell::F64), | |||
"json" => v.as_i64().map(Cell::Json), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is correct... maybe I should first learn how rust works...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is correct for f64
, but for json
I think it is better to use string convert in between.
@@ -156,6 +161,8 @@ fn row_to_body(row: &Row) -> JsonValue { | |||
if let Some(m) = v.0.clone().as_object_mut() { | |||
map.append(m) | |||
} | |||
} else { | |||
map.insert(col_name, v); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if someone can shed some light on this code if this is the correct implementation for normal json
values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks correct, but that requires the col_name
matches with Stripe json field, may need have some testing on this.
Thanks for the PR! Happy to see more objects to be added to this FDW, let us know once it is ready. |
hey @nielsbrakel, are you still working on this? I would like to add subscription_items and their usage record summaries to the list of supported objects and am wondering if I should start a new pr, or collaborate on this one? |
@psteinroe I'm planning to continue working on it, but can not give a date or time. |
closing due to inactivity. please re-open when ready |
NOTE: WIP Just looking for some feedback :)
What kind of change does this PR introduce?
What is the current behavior?
Added more object to make the wrapper more complete
What is the new behavior?
You can now access more information from stripe
Additional context
This is still a WIP so will place some comments on my own code to check some things.