How do I append row to database? #64
Closed
egeres
announced in
Announcements
Replies: 2 comments 2 replies
-
Hello, yes I can see that you execute new_page = Page.create(
parent = LinkTo(from_object=db.obj),
properties = {
"Name": PropertyValue.create("title", "My title")
}
)
created_page = no.pages.page_create(new_page) The Page object already has parent attr, because it's mandatory. And there is a constrain to use page_create on specific Element objects. Otherwise it would be possible to execute db.page_create(new_page) and db2.page_create(new_page) that creates two identical pages in the same database |
Beta Was this translation helpful? Give feedback.
2 replies
-
Converting to discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Accessing databases is pretty straightforward:
And if we run
db.db_query().obj.array
, we can iterate over the entries in a notion database as well as see the properties of each object accessing.properties
retrieves a dictionary with all the info... but I can't find a way to insert a new page in the database? I would have expected the following code to work, but it doesn't:Beta Was this translation helpful? Give feedback.
All reactions