wip: Working on fixing the CError, commented out the code:
- Commented out all models except the calendar model to fix the C Error - The error is coming from the dump method in the core_methods file - The error happen because we call `obj.dump` so, maybe a registered model does not implement this method, or there is an issue in any of these methods, so i commented out the code to unlock one by one to understand the reason of the compiler error
This commit is contained in:
@@ -4,7 +4,7 @@ import freeflowuniverse.herolib.core.redisclient
|
||||
import freeflowuniverse.herolib.hero.heromodels
|
||||
|
||||
mut mydb := heromodels.new()!
|
||||
// mydb.calendar.db.redis.flushdb()!
|
||||
mydb.calendar.db.redis.flushdb()!
|
||||
|
||||
mut o := mydb.calendar.new(
|
||||
name: 'Work Calendar'
|
||||
@@ -23,10 +23,10 @@ o.tags = mydb.calendar.db.tags_get(['work', 'important'])!
|
||||
// Add comments if needed
|
||||
// o.comments = mydb.calendar.db.comments_get([CommentArg{comment: 'This is a comment'}])!
|
||||
|
||||
oid := mydb.calendar.set(o)!
|
||||
mut o2 := mydb.calendar.get(oid)!
|
||||
mydb.calendar.set(mut o)!
|
||||
mut o2 := mydb.calendar.get(o.id)!
|
||||
|
||||
println('Calendar ID: ${oid}')
|
||||
println('Calendar ID: ${o.id}')
|
||||
println('Calendar object: ${o2}')
|
||||
|
||||
mut objects := mydb.calendar.list()!
|
||||
|
||||
8
examples/hero/heromodels/heromodels_calendar_event_simple.vsh
Normal file → Executable file
8
examples/hero/heromodels/heromodels_calendar_event_simple.vsh
Normal file → Executable file
@@ -31,8 +31,8 @@ o.tags = mydb.calendar_event.db.tags_get(['work', 'meeting', 'team'])!
|
||||
// Add comments if needed
|
||||
// o.comments = mydb.calendar_event.db.comments_get([CommentArg{comment: 'This is a comment'}])!
|
||||
|
||||
oid := mydb.calendar_event.set(o)!
|
||||
mut o2 := mydb.calendar_event.get(oid)!
|
||||
mydb.calendar_event.set(mut o)!
|
||||
// mut o2 := mydb.calendar_event.get(o.Base.id)!
|
||||
|
||||
println('Calendar Event ID: ${oid}')
|
||||
println('Calendar Event object: ${o2}')
|
||||
// println('Calendar Event ID: ${o.Base.id}')
|
||||
// println('Calendar Event object: ${o.Base.id}')
|
||||
|
||||
Reference in New Issue
Block a user