Skip to content
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

orm: ignores columns with type time.Duration #23033

Open
Le0Developer opened this issue Dec 1, 2024 · 3 comments
Open

orm: ignores columns with type time.Duration #23033

Le0Developer opened this issue Dec 1, 2024 · 3 comments
Labels
Bug This tag is applied to issues which reports bugs. ORM Bugs/feature requests, that are related to the V ORM. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend.

Comments

@Le0Developer
Copy link
Member

Le0Developer commented Dec 1, 2024

Describe the bug

orm is ignoring columns that have a type of time.Duration. Likely a aliasing bug.

Reproduction Steps

import time
import db.sqlite

struct Table {
  id int @[primary; serial]
  duration time.Duration
}

db := sqlite.connect('test.sqlite')!

sql db {
  create table Table
}

Then do sqlite3 test.sqlite --cmd table_info(table)

Expected Behavior

the column for duration exists

Current Behavior

the column is silently ignored

Possible Solution

  • Don't ignore
  • Throw an error if there's a column ORM doesn't understand

Additional Information/Context

No response

V version

d8021bd

Environment details (OS name and version, etc.)

N/A

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Huly®: V_0.6-21474

@Le0Developer Le0Developer added the Bug This tag is applied to issues which reports bugs. label Dec 1, 2024
@felipensp felipensp added Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. ORM Bugs/feature requests, that are related to the V ORM. labels Dec 1, 2024
@felipensp felipensp assigned felipensp and unassigned felipensp Dec 1, 2024
@felipensp
Copy link
Member

Currently it does not works with alias (time.Duration is an alias).

@vladimir-light
Copy link

Currently it does not works with alias (time.Duration is an alias).

Just curious. Alias of what

@JalonSolov
Copy link
Contributor

pub type Duration = i64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. ORM Bugs/feature requests, that are related to the V ORM. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: cgen Bugs/feature requests, that are related to the default C generating backend.
Projects
None yet
Development

No branches or pull requests

4 participants