We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When generating code for this SQL:
CREATE TABLE Talents ( id UUID PRIMARY KEY NOT NULL, name TEXT NOT NULL );
The DocC comment for the records is this (notice the "has default"):
public struct Talents : Identifiable, SQLKeyedTableRecord, Codable { /// Static SQL type information for the ``Talents`` record. public static let schema = Schema() /// Primary key `id` (`UUID`), required (has default). public var id : UUID /// Column `name` (`TEXT`), required (has default). public var name : String }
Neither id nor name has a database default though:
id
name
sqlite> PRAGMA table_info(Talents); cid name type notnull dflt_value pk --- ---- ---- ------- ---------- -- 0 id UUID 1 1 1 name TEXT 1 0
Though they get default values assigned in Swift:
public let id = MappedColumn<Talents, UUID>( externalName: "id", defaultValue: UUID(uuid: ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )), keyPath: \Talents.id ) public let name = MappedColumn<Talents, String>( externalName: "name", defaultValue: "", keyPath: \Talents.name )
The text was updated successfully, but these errors were encountered:
Fix Issue #13 (DocC comment claims "has default")
b442a92
If no default value is set, the comment won't be generated. Also improved the string comment a little.
Fixed.
Sorry, something went wrong.
helje5
No branches or pull requests
When generating code for this SQL:
The DocC comment for the records is this (notice the "has default"):
Neither
id
norname
has a database default though:Though they get default values assigned in Swift:
The text was updated successfully, but these errors were encountered: