Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions notes.org
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,29 @@
let posts_in_blog = query!(Post, &conn, blog = {blog}).load(&conn)
}
#+END_SRC

struct Posts

#+BEGIN_SRC sql
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title VARCHAR NOT NULL,
body TEXT NOT NULL,
published BOOLEAN NOT NULL DEFAULT 'f'
)
id SERIAL PRIMARY KEY,
title VARCHAR NOT NULL,
body TEXT NOT NULL,
published BOOLEAN NOT NULL DEFAULT 'f'
)
#+END_SRC

* Roadmap
** vNext
+ foreign key constraints in db, cascade setting
+ foreign key constraints in db, cascade setting [[https://github.com/Electron100/butane/issues/21]]
+ incremental save
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one isnt clear to me.
does this mean doing writes immediately when changing a struct instance? sounds crazy.
or Many.add writing immediately?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original intention of this line was save being able to do an update with only the fields that have actually changed, as a performance enhancement. However that really doesn't fit well with the current architecture of assigning directly to struct fields and I'm not sure I think it's a good idea any more. I think at this point I'd do something like DataResult (or like what Diesel does) to allow updates with a struct containing only a subset of the model fields.

+ Many backreferences
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is simply a function to take the caller from a Many instance to the instance that "(owner table, key)" points to?
Seems so, and seems not too hard to do, and also quite useful.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

+ Column renames in migrations
+ Column renames in migrations [[https://github.com/Electron100/butane/issues/89]]
+ prepared/reusable queries
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this isnt a limitation - there are some performance gains here, but ... I doubt typical users of butane would see this as a priority.

+ Improved custom support, including raw sql where clauses
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"raw sql where clauses" is a reasonable clear enhancement. Im not sure what else falls under "Improved custom support"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably best covered by issue #1 now

+ More precise spans in macro errors for invalid field names
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are likely a few easy improvements. Do we know some instances that need improvement?

+ Remove timestamp from migration names
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quite like the timestamp being in the name, but it is problematic when git rebasing a change. I can write up an issue about this, but I probably wont be able to fully capture the original intent of this item.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#91

+ auto FieldType for primitive enums
+ small int type
+ NaiveDate, maybe non-naive versions
+ auto FieldType for primitive enums - [[https://github.com/Electron100/butane/pull/68]] ?
+ small int type [[https://github.com/Electron100/butane/issues/86]]
+ NaiveDate, maybe non-naive versions [[https://github.com/Electron100/butane/issues/87]]