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

@ColumnInfo Support defaultValue #587

Closed
CrazyWalk opened this issue Jul 16, 2021 · 1 comment
Closed

@ColumnInfo Support defaultValue #587

CrazyWalk opened this issue Jul 16, 2021 · 1 comment

Comments

@CrazyWalk
Copy link

CrazyWalk commented Jul 16, 2021

Android Room @ColumnInfo support defaultValue

@ColumnInfo(name = "name", defaultValue = "")
var name: String = ""

sql

CREATE TABLE IF NOT EXISTS `book` (`id` TEXT NOT NULL, `name` TEXT NOT NULL DEFAULT '', `seq_id` INTEGER NOT NULL DEFAULT -1, `deleted` INTEGER NOT NULL DEFAULT 0, `sync_status` INTEGER NOT NULL DEFAULT 0, `created_at` INTEGER NOT NULL DEFAULT -1, `updated_at` INTEGER NOT NULL DEFAULT -1, `book_order` INTEGER NOT NULL DEFAULT -1, PRIMARY KEY(`id`))

now floor is not support 'DEFAULT' . Hope to add this feature

@mqus
Copy link
Collaborator

mqus commented Jul 16, 2021

Duplicate of #256

There are also suggestions for workarounds and why implementing this is not as useful or easy(from an API architectural view) as you think.

@mqus mqus marked this as a duplicate of #256 Jul 16, 2021
@mqus mqus closed this as completed Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants