Category "data-class"

Unable to invoke no-args constructor for class ConversionRates

I have a Currency Converter Android app. I 'm using retrofit for getting rates from API but as far as I'm concerned my app can't get data from api and it return

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

How to generate CREATE TABLE from Kotlin data class

In Kotlin, I'd like to generate a Postgres CREATE TABLE from my data class. For instance, if we have the following: data class Thing(name: String, quantity: Int

Dataclasses - AttributeError: type object 'Arguments' has no attribute 'column_names'

I am trying to use dataclasses to create a list of strings that can be used in a function. I am getting an attribute error when trying to access the information

What is the purpose of sort_index of a Dataclass in Python?

I am learning about Dataclasses but I am confused on the purpose of sort_index and how it actually works. I can't seem to find any valuable information on it. T

How to modify the parameter pass to kotlin data class?

Say I have a data class data class MyClass(val crop: Rect, val name: String) But I want to make a copy of the Rect passed in since I don't want the value to be