Skip to content

Commit

Permalink
move to "yz.debug.sqluiDebug( )"
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Dec 25, 2024
1 parent 8a0f0d8 commit 4c6de44
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13391,34 +13391,13 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
}
},
debug: {
writeTextFile: async function( { fileName , fileText } ) {
writeTextFile: async function ( { fileName , fileText } ) {
let resultsCode = await yz.postToYazzReturnJson(
"/http_post_save_debug_text_as_file",
{
debugFileName: fileName,
debugFileText: fileText
})
}
},
uiDb: {
//
// sqlui() - replaces all SQL commands so that debug data can be synced with server
// setupAlaSqlDatabase() - sets up the UI DB tables using AlaSQL
// createAlaSqlTable()
// setupAlaSqlSync() - used to sync data from UI to server side Sqlite for debugging purposes
//

sqlui: function ( sql , params ) {
let ret = yz.uiDb.sqluiDebug(null, sql , params)
return ret
},
sqlui1: function ( sql , params ) {
let res = null
let resBack = yz.uiDb.sqlui( sql , params )
if (resBack && resBack.length > 0) {
res = resBack[0]
}
return res
},
sqluiDebug: function ( dbgCode , sql , params ) {
yz.uiDb.currentDebugStack.currentSqlDebugId = dbgCode
Expand Down Expand Up @@ -13478,6 +13457,27 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
}
}
return ret
}
},
uiDb: {
//
// sqlui() - replaces all SQL commands so that debug data can be synced with server
// setupAlaSqlDatabase() - sets up the UI DB tables using AlaSQL
// createAlaSqlTable()
// setupAlaSqlSync() - used to sync data from UI to server side Sqlite for debugging purposes
//

sqlui: function ( sql , params ) {
let ret = yz.debug.sqluiDebug(null, sql , params)
return ret
},
sqlui1: function ( sql , params ) {
let res = null
let resBack = yz.uiDb.sqlui( sql , params )
if (resBack && resBack.length > 0) {
res = resBack[0]
}
return res
},
setupAlaSqlDatabase: async function ( ) {
alasql("CREATE TABLE ui_tables (table_name STRING)");
Expand Down Expand Up @@ -14415,7 +14415,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
for (let thisApp of responseJson) {
let alreadyExists = yz.uiDb.sqlui("select * from ui_table_appstore_apps where content_hash = ?", [thisApp.content_hash])
if (alreadyExists.length == 0) {
yz.uiDb.sqluiDebug("hgdfsgjhksdfghjkdsfgdfjskhgnfuybgfeiurybrgeruyigferuiyigfueirgueirwygyuieriur",
yz.debug.sqluiDebug("hgdfsgjhksdfghjkdsfgdfjskhgnfuybgfeiurybrgeruyigferuiyigfueirgueirwygyuieriur",
"insert into ui_table_appstore_apps ( old_id, content_hash , base_component_id, logo, display_name,component_type) values (?,?,?,?,?,?)",
[thisApp.base_component_id, thisApp.content_hash,thisApp.base_component_id,thisApp.logo, thisApp.display_name, thisApp.component_type])
}
Expand All @@ -14431,7 +14431,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
yz.uiDb.debugFn(arguments)
let alreadyExists = yz.uiDb.sqlui("select * from ui_table_installed_apps where code_id = ?", [app.code_id])
if (alreadyExists.length == 0) {
yz.uiDb.sqluiDebug("hdfjkshfjkdshfudisyouidsfyffdsbyoiudfsyboibdsfyioudsfbyoibsefyfdsidfsiobdsfoidfsbiodfsoi",
yz.debug.sqluiDebug("hdfjkshfjkdshfudisyouidsfyffdsbyoiudfsyboibdsfyioudsfbyoibsefyfdsidfsiobdsfoidfsbiodfsoi",
"insert into ui_table_installed_apps ( code_id , base_component_id, logo, display_name,component_type) values (?,?,?,?,?)",
[app.code_id,app.base_component_id,app.logo_url, app.displayName, app.component_type])
}
Expand Down

0 comments on commit 4c6de44

Please sign in to comment.